I think the problem is you aren't removing the prefixes, if there are any.

Edit: here's a simpler way of getting the chan list, free of prefixes. mIRC 6.17 is needed.

Code:
raw 319:*:{
  var %chans = $regsubex($3-,/(?<=^|)[ $+ $+(\Q,$prefix,\E) $+ ]+/g,), %i = 1, %l = $numtok(%chans,32), %curr.chan
  while (%i <= %l) {
    %curr.chan = $gettok(%chans,%i,32)
    if ($me !ison %curr.chan) {
     ; something
    }
    inc %i
  }
}

Last edited by schaefer31; 17/04/06 03:38 AM.