All pastes #498968 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-20 20:00 UTC
rendered paste body
on *:TEXT:!track *:#: {
  if ($regex($2,/^-c(#.*)$/)) {
    if (!$chan($regml(2)) {
      msg $chan Not in specified channel.
      halt
    }
    else {
      var %c = $regml(2)
      tokenize 32 $2-
    }
  }
  if (*!*@* !iswm $2) msg $chan You must specify a valid hostmask to search for.
  elseif (!$iif(%c,$ialchan($2,%c,2),$ial($2,2))) msg $chan No users matching the hostmask $2 were found.
  else {
    var %a = 2
    while ($iif(%c,$ialchan($2,%c,%a).nick,$ial($2,%a).nick)) {
      var %n = %n $v1
      inc %a
    }
    msg $chan Users found matching hostmask $2 $+([,$numtok(%n,32)) in total]:
    msg $chan $replace(%n,$chr(32),$+($chr(44),$chr(32)))
  }
}