mIRC Home    About    Download    Register    News    Help

Print Thread
why does this only tell me ops? #11536 16/02/03 05:33 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
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
}
Re: why does this only tell me ops? #11537 16/02/03 05:45 PM
Joined: Jan 2003
Posts: 94
S
Sabby Offline
Babel fish
Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
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
  }
}


-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
Re: why does this only tell me ops? #11538 16/02/03 07:05 PM
Joined: Dec 2002
Posts: 16
W
wanted Offline
Pikka bird
Offline
Pikka bird
W
Joined: Dec 2002
Posts: 16
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