Access Badwordsfilter directly

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

Moderators: Lapo, Bax

User avatar
Posts: 177
Joined: 26 Jan 2009, 12:54
Location: Berlin, Germany

Access Badwordsfilter directly

Postby rewb0rn » 18 Sep 2019, 10:16


is the badwords filter accessible directly to check strings if they contain badwords? We are using the Smartfox API with a configured badwords filter for our public chats, but we have a custom message for private chats. We would now like to use the badwords filter so that we don't have to maintain 2 different systems. The goal is to identify if a message contained bad words. If so warn the user and ultimately kick or ban them. Same like the public chats work.

Thanks in advance
User avatar
Site Admin
Posts: 21528
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Access Badwordsfilter directly

Postby Lapo » 18 Sep 2019, 15:42

the message filter is placed in a specific point of the message chain, so that it can catch matching words before they get sent to other players.
I am not sure what you mean by "accessible directly to check strings".
The class that runs the filtering is not pluggable by some other external code, if that's what you're asking.

What you could do instead is filter the messages earlier, before they even reach the bad word filter. To do so you can add a SystemController Filter, as explained here: ... er-filters

Hope it helps
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: ankitj90, Majestic-12 [Bot] and 8 guests