Fair warning, I didn't test this, but it should work. Words are separated by a |
If two or more 'bad words' are in the same line, then it kicks with no warning. Otherwise if only 1 word is in a line, then it first gives a warning, and on second time it kicks and resets the counter.
Edit: Made a couple small corrections and changed it so it tracks by the user's address and not their nick.
on @*:TEXT:*:[color:red]#Channel[/color]:{
if ($regex($1-,/\b([color:red]zzzz[/color]|[color:red]kkkk[/color])\b/igS)) {
if ($regml(0) >= 2) kick $chan $nick
else {
var %address = $remove($address($nick,2),*,!,@)
hinc -m Warnings %address
if ($hget(Warnings,%address) == 1) msg $chan Warning $nick $+ , You are not allowed to say $regml(1) in this channel.
else kick $chan $nick
hdel Warnings %address
}
}
}