Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

WordFilter - An automatic chat Moderator.

Custom scripts
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
KliPeH
Moderator
Moderator
Posts: 823
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

WordFilter - An automatic chat Moderator.

Post by KliPeH » Fri Jul 12, 2019 8:45 pm

_______________________________________________________
 
Image

Image

Image
________________________________________________________
 
Downloads
 
WordFilter (Game terms)
 | WordFilter (Global)
| WordFilter (Blank)
 
What Is This?
It is no secret the SuperFighters franchise is marketed towards (or at least inadvertently attracts) the younger audiences. Game hosts may thus wish to have more control over what is said and spoken on their servers to minimize exposure to harmful dialect.

The WordFilter script introduces a customizeable word list that can prevent players from continuously insulting or berating others when the owner or Moderators are offline. If the script detects a message with a forbidden term in it the player will receive an infraction. Once a player receives a certain amount of infractions (3 by default) they will automatically be kicked and/or banned from the server.

The host can decide whether infractions are announced as a message or /whispered to the player in a discrete fashion, and how many of them to hand out. They can control whether the punishment will be a ban or a kick (kick is set up by default to prevent accidents). The script can keep track of offline users until it is terminated, meaning exiting the game will not reset the warn counter thus making kicking as punishment completely viable as is.

There is an option to delay the kick/ban by a few seconds, just enough for the player to understand what is about to happen. An announcement notifying players of the script being run in the background can be turned on and off at will (on by default).

Players can see a limited list of forbidden terms by saying "/words" in chat. This is also mentioned in the announcement by default.

This script is compatible with BotTaunts! Bots using forbidden terms will not be punished.

Filters  
The following is my recommended custom-made filter of commonly used game terms among the SFD community. This is general stuff I don't like seeing in my games; you don't have to use this but this is what I provide as a download with blank version available as well.
► Show Spoiler
Now this is my global cuss-word list; a curated version of the "Full List of Bad Words" text file found here [SFW].

The original contains just over 1,700 terms officially banned by Google. My list contains that, minus 410 porn-related titles that had nothing to do with SFD and that I removed. Using this is very restrictive and makes venting frustration in chat pretty much impossible. I don't recommend using it but it's available to you Christian hosts out there nonetheless.

WARNING: NSFW! Also, extremely long.
► Show Spoiler
---
Thanks for downloading, as always, all constructive feedback welcome!
8 x
 
Image

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 483
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Sat Jul 13, 2019 12:22 pm

@KliPeH Is worth to question, what happens when the player is conscious to be warned and he changes the word a little bit, e.g:

noob
n.o.o.b
noo b

I often see this trick in lots of "auto moderated" environments. There is some kind of system that breaks down the chat string to find possible forbidden words?
1 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1607
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 29

Post by Gurt » Sat Jul 13, 2019 12:36 pm

JakSparro98 wrote:
Sat Jul 13, 2019 12:22 pm
@KliPeH Is worth to question, what happens when the player is conscious to be warned and he changes the word a little bit, e.g:

noob
n.o.o.b
noo b

I often see this trick in lots of "auto moderated" environments. There is some kind of system that breaks down the chat string to find possible forbidden words?
An automated system that's not trained on user-data (like a proper AI) won't catch everything and automated systems will also eventually be bypassed when the userbase learns how to avoid the filters. It also needs to be constantly updated with new words as the language evolves. But for common words that are intentionally used to insult - it's a neat filter.

You can do some clever manipulation to figure out variations of words too. First you could normalize and sanitize your input. For example, convert $ to S and 0 to O and | to I or l, 3 = E etc,.... Then you basically only keep all a-Z and 0-9 characters and if you find a word that's in the list you probably got a match. This allows you to only register "noob" in your list instead of all variants of "n0ob", "n00b", "no0b" "n@@b" and so on.
2 x
Gurt

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 483
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 20

Post by JakSparro98 » Sat Jul 13, 2019 3:24 pm

Gurt wrote:
Sat Jul 13, 2019 12:36 pm

[..]

You can do some clever manipulation to figure out variations of words too. First you could normalize and sanitize your input. For example, convert $ to S and 0 to O and | to I or l, 3 = E etc,.... Then you basically only keep all a-Z and 0-9 characters and if you find a word that's in the list you probably got a match. This allows you to only register "noob" in your list instead of all variants of "n0ob", "n00b", "no0b" "n@@b" and so on.
The question was regarding the script itself, if there was implemented something to overcome these tricks, I wasn't asking how in general I can sanitize a string but if they took countermeasures for these cases because once the player has got that the system is nothing but a String.Compare(""); then the hatred is not being stopped, only flowed on crippled words.

Anyway if that wasn't the case, here we have a good base idea of how to proceed, even if I think using some kind of light-weight machine learning algorithm on entire sentences could be the way, collecting data permanently is now possible and there is no need to process all the data in the same frame (async execution).
0 x

User avatar
KliPeH
Moderator
Moderator
Posts: 823
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

Post by KliPeH » Sat Jul 13, 2019 6:05 pm

JakSparro98 wrote:
Sat Jul 13, 2019 12:22 pm
@KliPeH Is worth to question, what happens when the player is conscious to be warned and he changes the word a little bit, e.g:

noob
n.o.o.b
noo b

I often see this trick in lots of "auto moderated" environments. There is some kind of system that breaks down the chat string to find possible forbidden words?
Gurt wrote:
Sat Jul 13, 2019 12:36 pm
An automated system that's not trained on user-data (like a proper AI) won't catch everything and automated systems will also eventually be bypassed when the userbase learns how to avoid the filters. It also needs to be constantly updated with new words as the language evolves. But for common words that are intentionally used to insult - it's a neat filter.

You can do some clever manipulation to figure out variations of words too. First you could normalize and sanitize your input. For example, convert $ to S and 0 to O and | to I or l, 3 = E etc,.... Then you basically only keep all a-Z and 0-9 characters and if you find a word that's in the list you probably got a match. This allows you to only register "noob" in your list instead of all variants of "n0ob", "n00b", "no0b" "n@@b" and so on.
Thanks for your concerns and contributions.
I asked @Sree whether he could implement such a feature and he has worked tirelessly to do just that.
► Show Spoiler
All download links have been updated. The Global version might need a revisit after the change, but I honestly can't be bothered to shorten the list further. Feel free to do so yourselves and post the results here.

Cheers!
1 x
 
Image

Post Reply