Thanks again for the efforts. I tried what you posted and unfortunately had no luck with making that work. I ended up putting it in a while loop and it's doing what I want now. I also prefer your idea of using 2 to shorten the Ban, it keeps the badword from being repeated. smile
Code:
  var %i = 0
  while (%i < $comchan($newnick,0)) { 
    inc %i 
  if ($newnick isop $comchan($newnick,%i)) || ($newnick ishelp $comchan($newnick,%i)){ return }
  if ($hfind(bad,$newnick,1,W)) {
    ban -ku30 $comchan($newnick,%i) $newnick 2 Not Allowed!
}
Oh yes, and courtesy of Tomao this one works as well, and is very channel specific. Thanks Tomao! grin
Code:
  var %s = #testchannel
  if ($hfind(bad,$newnick,0,W)) { 
    var %c = 1
    while (%c <= $comchan($newnick,0)) {
      if ($istok(%s,$comchan($newnick,%c),32)) {
        if ($newnick isop $comchan($newnick,%c)) || ($newnick ishelp $comchan($newnick,%c)) return  ; <--added by me for obvious reasons
        ban -ku30 $comchan($newnick,%c) $newnick 2 Not Allowed!
      }
      inc %c
    }
  }

Last edited by displayname; 24/09/12 01:25 AM.