Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Nicksearch

Recommended Posts

  • Administrators
Description: Shows nicknames matching wildtext

 

 

>nicksearch {  if (!$regex($1,^(-c|-a)$)) { echo -a (!) Error: Incorrect usage of /nicksearch | halt }  hmake nicksearch 1000  var %i = 1, %result  while ($comchan($me,%i)) {    var %x = 1    while ($nick($comchan($me,%i),%x)) {      if ($2 iswm $nick($comchan($me,%i),%x)) {         inc %result | hadd nicksearch $+($comchan($me,%i),:) $addtok($hget(nicksearch,$+($comchan($me,%i),:)),$iif($hget(nicksearch,$+($comchan($me,%i),:)) == $null,$nick($comchan($me,%i),%x),$+($chr(44),$nick($comchan($me,%i),%x))),0)      }              inc %x    }      inc %i   }  if (%result != $null) {    if ($1 == -a) { echo -a 3(!) Total of: %result matching $+(,$2) | echo -a 3(!) $nick.results }    if ($1 == -c) { msg # (!) Total of: %result matching $+(,$2) | msg # (!) $nick.results }  }    hfree nicksearch}nick.results {  var %i = 1, %final, %lay, %results  while ($hget(nicksearch,%i).item) {    %lay = $+($chr(40),$hget(nicksearch,%i).item))    %results = $addtok(%lay,$+($chr(32),$hget(nicksearch,$hget(nicksearch,%i).item),$chr(41)),0)    inc %i    %final = $addtok(%final,$+($chr(32),%results),0)  }  return Results: %final}

Link to comment
Share on other sites



×
×
  • Create New...