All pastes #589031 Raw Edit

Unnamed

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