Hello , im not sure this is exactly what your requesting , but here is the "ChatModo" for Drive_LFSS project.
there is 4 Kind of Word:
0- Word OK
1- Word Make Linked Word Bad
2- Word is limit but BAD if type 1 is before.
3- Totaly BAD alone or in sentence.
the 0 is more used , when the system detect as example:
Shock , can be detects as "f u c k" , so i add the Word Shock as 0 Type , system will not change Shock for "f u c k".
The type 1 is: YOU or Private Message, any designation.
Type 2 is a bad word but really depend the way people using it, example:
F u c k , become , please check your language, but "f u c k You" , will become a Inappropriate language. So i can say, f u c k my Shock are bad, and will be ok.
And finally the Type 3 , all type 3 word are auto detected as Inappropriate Language.
Command : "!badword word type" , is used ingame by admin to add or remove word.
Action taken for the moment there is NONE, im simply saving this in the Player DB , but will add soon , a list of action admin can take auto.
The system use 3 Level of detection.
Level 1 , search the exact Word.
Level 2, Search for the word that require the smalles Change to become a bad word(Levenstein)
Level 3 , System strip non WORD char and do Level 1 and 2 Again.
if i added the word " f u c k" , mean he will detect this:
suck, f%u^&k, uck, %^F U C K^$%$ ... and so one, all thoses word will be catched as F u c k.
This make the system very good, with a very low count of word into the DB, i have at the moment 38 word, and seem it becoming very hard to found new that are not detected.
This is not real Time, since STRING word can be very slow, all Chat text are send to the chatModo, at all 200ms the chat modo check only 1 line at time, if he detect something wrong will tell and record it.
here is the source code for the ChatModo:
http://maya.aleajecta.com/trac ... rc/chat_modo/chat_modo.cs