Hi,
what does it mean ?i, [ ,| \w, etc... could you explain ? there is no documents about badwordlist usage ?
i need details
please help
for exam,
(?i:bigass)
([b|B][\W]*[i|İ][\W]*[g|G][\W]*[a|A][\W]*[s|S][\W]*[s|S][\W]*)
thanks
badwordlist usage?
Re: badwordlist usage?
It uses regular expressions, a standard "language" for matching any type of strings:
https://en.wikipedia.org/wiki/Regular_expression
https://en.wikipedia.org/wiki/Regular_expression
Re: badwordlist usage?
thanks Lapo,
so i need only 1 word for filter when i add (?i:mother) to wordfilter sfs showing
motherboard like this "****board" or grandmother showing "grand*****" so i want to filter just "mother"
i mean
1. if user write "hi this is my mother" ---> "hi this is my *****" (filtered mother)
2. if user write "hi this is my motherboard" ---> "hi this is my motherboard" (dont filter mother in motherboard)
i need 2. examp
thanks
so i need only 1 word for filter when i add (?i:mother) to wordfilter sfs showing
motherboard like this "****board" or grandmother showing "grand*****" so i want to filter just "mother"
i mean
1. if user write "hi this is my mother" ---> "hi this is my *****" (filtered mother)
2. if user write "hi this is my motherboard" ---> "hi this is my motherboard" (dont filter mother in motherboard)
i need 2. examp
thanks
- gabrielvpy
- Posts: 69
- Joined: 23 Jul 2015, 20:18
Re: badwordlist usage?
Hi, has this issue been solved? I'm struggling with the same issue.
We made an awesome GPS - MOBA.
Try it out here: Get Fhacktions
Try it out here: Get Fhacktions
Re: badwordlist usage?
It all depends on the regular expression you use to filter words. The regexp above searches for the exact word but you can use any type of expressions that can include or exclude extra characters, prefixes, etc...
I am not a regexp expert so you may need to experiment a bit or google a regular expression guide.
Cheers
I am not a regexp expert so you may need to experiment a bit or google a regular expression guide.
Cheers
- gabrielvpy
- Posts: 69
- Joined: 23 Jul 2015, 20:18
Re: badwordlist usage?
Honestly I was just being lazy. All you need to do is to surround the word with \b. God bless google and stackoverflow.
We made an awesome GPS - MOBA.
Try it out here: Get Fhacktions
Try it out here: Get Fhacktions
Re: badwordlist usage?
gabrielvpy wrote:Honestly I was just being lazy. All you need to do is to surround the word with \b. God bless google and stackoverflow.
- gabrielvpy
- Posts: 69
- Joined: 23 Jul 2015, 20:18
Re: badwordlist usage?
Lapo, I have another question. In our game you have your faction, so we create a room for every faction called "chat_faction_name" in order for faction members to chat with each other. The sole purpose of said room is for it to be their chat room. The issue we are facing now is that you can't create a room using a bad word as it's name. When I say a bad word of course I mean a word listed in the wordsFile.txt file. Wich is fine, you shouldn't name your faction wiht a bad word in the first place. So how can I use the wordsFile.txt within my extension for me to prevent my player to use any bad word listed there as their faction name?
We made an awesome GPS - MOBA.
Try it out here: Get Fhacktions
Try it out here: Get Fhacktions
Re: badwordlist usage?
You can use something like this in your Extension code:
where currentZone is a reference to the app's zone.
Cheers
Code: Select all
IWordFilter wordFilter = currentZone.getWordFilter();
if (wordFilter.isActive() && wordFilter.getFilterMode() == WordsFilterMode.BLACK_LIST)
{
FilteredMessage filteredName = wordFilter.apply(factionName);
if (filteredName.getOccurrences() > 0)
throw new RuntimeException("Faction name contains bad words");
// Faction name is clean... proceed...
}
where currentZone is a reference to the app's zone.
Cheers
- gabrielvpy
- Posts: 69
- Joined: 23 Jul 2015, 20:18
Who is online
Users browsing this forum: No registered users and 126 guests