Advertisement
westor

Get other network channel nicks v1.0 for Wizard

Nov 22nd, 2018
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.75 KB | None | 0 0
  1. alias -l find_cid {
  2.   var %t = $scon(0)
  3.  
  4.   if (!$1) || (!%t) { return 0 }
  5.  
  6.   while (%t) {
  7.     var %network = $scon(%t).network
  8.     var %cid = $scon(%t).cid
  9.     if ($1 == %network) { return %cid }
  10.     dec %t
  11.   }
  12.  
  13.   return 0
  14. }
  15.  
  16. alias -l list_users {
  17.   var %now_cid = $cid
  18.   var %chan = $2
  19.   var %cid = $find_cid($1)
  20.   scid -t1 %cid
  21.   var %users = $nick(%chan,0)
  22.   var %n = 1
  23.   while (%n <= %users) {
  24.     hadd -m USERS $nick(%chan,%n) 1
  25.     inc %n
  26.   }
  27.   scid -t1 %now_cid
  28.   var %t = $hget(USERS,0).item
  29.   var %i = 1
  30.   while (%i <= %t) {
  31.     var %nick = $hget(USERS,%i).item
  32.     msg $nick Nick %i $+ : %nick
  33.     if (%i == %t) { msg $nick End of nicks. }
  34.     inc %i
  35.   }
  36.   hfree -w USERS
  37. }
  38.  
  39. ON *:TEXT:!nicks *:?: { list_users $$2- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement