Ok so use this :

on *:nick:{
var %i = $numtok($badnick,32) ,%n $newnick
while (%i) {
if ($+(*,$gettok($badnick,%i,32),*) iswm %n) { hinc -m badnick %n $calc($hget(badnick,$nick) +1) | break }
dec %i
}
if ($hget(badnick,$nick)) hdel badnick $nick
var %h = $hget(badnick,%n) ,%cmd $iif(%h == 1,msg x kick,$iif(%h == 2,ban -k))
if (%cmd) && ($me isop #sigbin) && (%n !isop $v2) %cmd $v2 %n $iif(%h == 2,2) Badnick !
if (%h == 2) hdel badnick %n
}

i add some "if" to delete the table for the old $nick, and another to delete the table of the $newnick if it's the second time that you "do something" for this nick..

Edit : change the $iif and if part, user that don't match your list were always ban

Last edited by Wims; 16/08/07 03:36 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel