mIRC Homepage
Posted By: xrn0id why does this only tell me ops? - 16/02/03 05:33 PM
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
Posted By: Sabby Re: why does this only tell me ops? - 16/02/03 05:45 PM
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
  }
}
Posted By: wanted Re: why does this only tell me ops? - 16/02/03 07:05 PM
This one takes half of the time:

Code:
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
  }
} 
 


wanted
© mIRC Discussion Forums