Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias -l find_cid {
- var %t = $scon(0)
- if (!$1) || (!%t) { return 0 }
- while (%t) {
- var %network = $scon(%t).network
- var %cid = $scon(%t).cid
- if ($1 == %network) { return %cid }
- dec %t
- }
- return 0
- }
- alias -l list_users {
- var %now_cid = $cid
- var %chan = $2
- var %cid = $find_cid($1)
- scid -t1 %cid
- var %users = $nick(%chan,0)
- var %n = 1
- while (%n <= %users) {
- hadd -m USERS $nick(%chan,%n) 1
- inc %n
- }
- scid -t1 %now_cid
- var %t = $hget(USERS,0).item
- var %i = 1
- while (%i <= %t) {
- var %nick = $hget(USERS,%i).item
- msg $nick Nick %i $+ : %nick
- if (%i == %t) { msg $nick End of nicks. }
- inc %i
- }
- hfree -w USERS
- }
- ON *:TEXT:!nicks *:?: { list_users $$2- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement