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.