Hey there,

i was trying out this ban enforcer and couldnt get it to halt when the amount of nicks the banmask matched exceeds 2

the : if (%kick) { kick $chan %kick «-Banned-» } still executes anuway to halt that as well when $numtok(%kick,44) > 2.


Code

ON *:ban:#test:{ 
  if ($nick(#,$me,~&@%)  || o isin $usermode ) { 
    var %ixz = 1 
    while ($ialchan($banmask,$chan,%ixz).nick != $null)  { 
      var %user =  $v1
      if (!$nick($chan, %user ,@&%+) && !$istok( $me , %user ,32)  && %user ison $chan) { var %kick = $addtok(%kick,%user,44) }
      if ($numtok(%kick,44) > 2) { break | mode $chan -b $banmask | unset %kick }
      if ($numtok(%kick,44) == 4) { kick $chan  %kick «-Banned-» | unset %kick }
      inc %ixz 
    }
    if (%kick) { kick $chan  %kick «-Banned-» }
  }
}