lists the nicks
on *:Text:.ln:#: {
.notice $nick $+ $rand(1,15) $+ , $+ $rand(1,15) $+ Listing nicks for #
set %i 1
:next
if %nickcount == 20 goto done
set %nick $nick(#,%i)
if (%nick == $null) goto done
if (%nick isop #) notice $nick 4,13 $+ %nick is an Op!
if (%nick ishop #) notice $nick 7,13 $+ %nick is a Halfop!
if (%nick isvoice #) notice $nick 11,13 $+ %nick is Voice!
if (%nick isreg #) notice $nick 9,13 $+ %nick is a regualar...
inc %nickcount
inc %i
goto next
:done
unset %nickcount
notice $nick $+ $rand(1,15) $+ , $+ $rand(1,15) $+ I am only authorized to show 20 results.
}
Firstly, this is stupid - it could be used a lil useful only as a spybot, but thats stupid too. Second - the first 20 nicks showing is pretty stupid too - if you don`t know how to view all of them, use $nick($chan,0) instead of 20.
I would make it like this:
alias channicks {
.var %nicks = $nick($chan,0)
.var %nick = 0
while (%nicks > %nick) {
.inc %nick
.var %nownick = $nickstatus($nick($chan,%nick),$chan)
.return %nownick
}
alias nickstatus {
if ($1 isop $2) { .return @ $+ $1 }
if ($1 ishop $2) { .return % $+ $1 }
if ($1 isvop $2) { .return + $+ $1 }
else { .return $1 }
}
You should use var %i = 1 and a while loop instead of a goto loop, it\'s shorter, easier, and leaves less room for error.
var %i = 1
while (%i <= 20) {
var %nick = $nick(#,%i)
if (%nick isop #) notice $nick 4,13 $+ %nick is an Op!
if (%nick ishop #) notice $nick 7,13 $+ %nick is a Halfop!
if (%nick isvoice #) notice $nick 11,13 $+ %nick is Voice!
if (%nick isreg #) notice $nick 9,13 $+ %nick is a regualar...
inc %i
}
}