WordFile.txt does not work on 2.12 but works on 2.9

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

tbautista
Posts: 1
Joined: 13 Mar 2017, 03:35

WordFile.txt does not work on 2.12 but works on 2.9

Postby tbautista » 13 Mar 2017, 03:46

Hello,

I a wordfile.txt that works on our 2.9 version of smartfox, but for some reason it does not work on 2.12. I would need some help on how to resolve this so that we can upgrade our server to the latest version.

I cannot attach the txt file for some reason, but here is the content.

Code: Select all

(?i:asshole)
(?i:shit)
(?i:son of a bitch)
(?i:sonofabitch)
(?i:shitlover)
(?i:motherfucker)
(?i:fucker)
(?i:assfucker)
(?i:asslicker)
(?i:bastard)
(?i:nigger)
(?i:nigga)
(?i:mark)
(?i:bastard)
(?i:tjay)
(?i:shit)
(?i:骗)
(?i:假)
(?i:出款)
(?i:漏洞)
(?i:税逃)
(?i:丑)
(?i:操)
(?i:党)
(?i:中国)
(?i:政府)
(?i:游行)
(?i:日)
(?i:妈)
(?i:法轮功)
(?i:宗教)
(?i:名族)
(?i:菲律宾)
(?i:水)
(?i:www)
(?i:com)
(?i:cn)
(?i:qq)
(?i:cc)
(?i:net)
(?i:org)
(?i:干)
(?i:操)
(?i:免费)
(?i:官网)
(?i:奖金)
(?i:优惠)
(?i:好礼)
(?i:彩金)
(?i:微信)
(?i:line)
(?i:注册)
(?i:退佣)
(?i:码)
(?i:%)
(?i:红利)
(?i:点数)
(?i:1)
(?i:2)
(?i:3)
(?i:4)
(?i:5)
(?i:6)
(?i:7)
(?i:8)
(?i:9)
(?i:0)
([f|F][\W]*[u|U][\W]*[c|C][\W]*[k|K][\W]*)



Thanks!
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WordFile.txt does not work on 2.12 but works on 2.9

Postby Lapo » 13 Mar 2017, 09:35

What do you mean it doesn't work?
What is the problem exactly?
Do you have specific server side errors?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Rutter
Posts: 99
Joined: 12 Dec 2007, 16:21
Location: Canada
Contact:

Re: WordFile.txt does not work on 2.12 but works on 2.9

Postby Rutter » 09 Apr 2017, 19:04

Ive just turned on the bad word filter everywhere and it doesn't appear to work for me either. I'm using the PublicMessageRequest method and grabbing the message events parameter to display but even with the default wordlist nothing is being filtered. There are no errors showing up in the server logs.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WordFile.txt does not work on 2.12 but works on 2.9

Postby Lapo » 10 Apr 2017, 07:34

Can you tell me which SFS2X version you're using, which client API and give me an example of a message not being filtered?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Rutter
Posts: 99
Joined: 12 Dec 2007, 16:21
Location: Canada
Contact:

Re: WordFile.txt does not work on 2.12 but works on 2.9

Postby Rutter » 10 Apr 2017, 18:35

Latest version 2.12.4 but also didn't work with just 2.12. Don't know if it worked or didn't work with earlier versions because I've just added a chat feature and turned on the filtering service. Client api is 1.7.5 dated Feb 7 2017. I have a development version of our work that we added the example from the docs and tried to enter any of the words in the config/wordsFile.txt but none of the words were blocked. Must be something simple I'm missing.

Here's my code that isn't working.

Code: Select all

btn_send.addEventListener(MouseEvent.MOUSE_UP, sendMessage);

function sendMessage(event)
{
   var chatMessage:String = chat_txt.text;
   sfs.send(new PublicMessageRequest(chatMessage));
}

function onPublicMessage(evt:SFSEvent)
{
   chat2_txt.text = evt.params.message;
   trace("onPublicMessage function fired");
}
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WordFile.txt does not work on 2.12 but works on 2.9

Postby Lapo » 11 Apr 2017, 07:40

Thanks, I also asked this:
... and give me an example of a message not being filtered?


The default words file in SmartFoxServer contains various bad word reg exp, for example:

Code: Select all

(?i:shit)


Unless you have modified the standard file, you should be able to see that any instance of "shit" gets correctly removed from the resulting message.
Another reason for potential problems is your settings of the WordsFilter in your Zone. The defaults are these:
Schermata 2017-04-11 alle 09.46.23.png
(174.43 KiB) Not downloaded yet


cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Rutter
Posts: 99
Joined: 12 Dec 2007, 16:21
Location: Canada
Contact:

Re: WordFile.txt does not work on 2.12 but works on 2.9

Postby Rutter » 12 Apr 2017, 02:42

Sorry I wasn't being completely clear, but we have tried all of the words in the default bad word file and none of them get removed or **** out which is what we expected. I have checked our word filter settings for the zones and they appear as per your screen shot. No modifications of the word file just using the straight default file installed with the server.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: WordFile.txt does not work on 2.12 but works on 2.9

Postby Lapo » 12 Apr 2017, 07:40

Out of the box the word filter is not active, so you won't see it working right after the installation.
You need to activate at Zone level to make sure it will filter cuss words in user names and Room names.
You will also need to activate it on a per Room basis depending on which Rooms you need to filter.

Please double check that that Room you're testing with has the filter active.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 53 guests