Well, It's a simple swear kicker. All you need to do is set a variable, %swear to have all your swear words. i.e. %swear shit|fuck|damn|asshole|cunt. Be careful though, If you don't have the |, it won't be read. Also, if you have a | with nothing next to it, that acts like a nothingness wildcard, filtering every imaginable character. This script will also read spaces. Example, my %swear is: shit|fuck|suck dick|damn|bitch|bastard|asshole|cunt|cock. Lastly, another precuation, if you are a n00b, do not use this. If you add a word, make sure it's not a part of harmless words, like "ass". Assume would get picked up for the ass part.
on *:text:*:#:{ if ($nick !isop $chan) && $regex($strip($1-),%swear) { kick $chan $nick Bad Word Detected } }
Same as ^silk. Your snippet will never work for anyone except for you.
The reason is that you use a glabal variable %swear known only by you.
Here\'s another method.
;
On $@*:Text:/(BadWord1|BadWord2|BadWord3)/Si:#:{
If ($nick !isop $chan) { KICK $v2 $v1 Bad Word Detected }
}
;
The dollar \'$\' sign at the start of the event means \'allow regular expression match\'. This then permits to directly put the pattern in event declaration. I\'ll let you find out about $v1 and $v2. The /S option in the pattern means \'strip data before matching\'. :o)
/help on text
Regards
I\'m wondering if you tested this at all because by the looks of it this snippet won\'t work either. Try this:
on @:text::#:{
var %swear = fuck shit ass
if ($istok($1-,%swear,32)) { kick # $nick Bad word detected }
}
That\'s just a \'functional\' version of your snippet. I would add much more, such as warnings and bans.