I tried to write the following script but when I tried to test it, mirc crashes. is there something wrong with it or is there something wrong with mirc?
Code:
 
on *:nick:{ 
  if *666* iswm $newnick {
    var %i = i
    var %x = $comchan($newnick,1)
    while (%x) {
      if $me isop %x { ban -k %x $newnick 2 testing }
      inc %i
      %x = $comchan($newnick,%i)   
    }
  }
}