Code:
on *:JOIN:#channel: {
  if (!$hget(badnick)) hmake badnick 10
  var %i = 1
  while ($gettok($badnick,%i,32)) {
    if ($+(*,$gettok($badnick,%i,32),*) iswm $nick) {
      if ($nick !isop $chan) {
        hinc badnick $nick
        var %badnick = $gettok($badnick,%i,32)
        if ($hget(badnick,$nick) == 1) .ban # $nick $+ !*@* 2 75 change nick (forbidden nick: %badnick $+ )
      }
    }
    inc %1
  }
}


how can i make this script work without the incrementation of the variable "%i" anyone?

and one more thing can anyone help me to change this script to work in change nick like when a user change nick to a badnick it will be kicked or banned or warned...

thankz in advanced