alias test { set %n 1 :a set %t $nick($chan,%n) if (%t isvoice $chan) { echo -a %t Voiced! set %n $calc(%n + 1) unset %t goto a } if (%t isop $chan) { echo -a %t OPed! set %n $calc(%n + 1) unset %t goto a } if (%t isreg $chan) { echo -a %n Norm set %n $calc(%t + 1) unset %t goto a } return }
one it finishes return the ops, it stops
;Check for Life if (%life == $null) { goto getlife }
if you want to list the users, just use a while loop:
Code:
alias listusers {
var %x = $nick($chan,0)
while (%x) {
var %n = $nick($chan,%x)
if (%n isop $chan) echo -a %n Is Oped!
elseif (%n isvoice $chan) echo -a %n Is Voiced!
else echo -a %n Is Regular!
dec %x
}
}
alias list {
var %i = $nick($chan,0)
while (%i) {
var %t = $nick($chan,%i)
echo -s %t $iif(%t isop $chan,Is Oped!,$iif(%t isvoice $chan,Is Voiced!,Is Regular!))
dec %i
}
}