Profanity and bad word filter - 06/02/18 03:57 PM
Hello guys!
I would require some help regarding this script:
This works just fine, if somebody writes "table" or "chair" and "table" is in the profanity.txt, or if the word "chair" is in the badwords.txt, it sends a ban command to the other channel, where a bot bans the username(-2 characters).
My only problem is, that if somebody writes "I am sitting on the chair", or "The food is on the table", then nothing happens.
Please somebody fix the script, so it activates even if somebody types asdasdchairasdasd or skhslkjnhkTABLEasdhnfslh.
Thank you for your help in advance.
I would require some help regarding this script:
Code:
on *:TEXT:*:#modbot:{ if $read(profanity.txt,w,$replace($1-,$chr(32),$chr(95))) { msg #bottest !ban $right($nick,-2) 6 profanity } elseif $read(badwords.txt,w,$replace($1-,$chr(32),$chr(95))) { msg #bottest !ban $right($nick,-2) 2 bad word } else { halt } }
This works just fine, if somebody writes "table" or "chair" and "table" is in the profanity.txt, or if the word "chair" is in the badwords.txt, it sends a ban command to the other channel, where a bot bans the username(-2 characters).
My only problem is, that if somebody writes "I am sitting on the chair", or "The food is on the table", then nothing happens.
Please somebody fix the script, so it activates even if somebody types asdasdchairasdasd or skhslkjnhkTABLEasdhnfslh.
Thank you for your help in advance.