$nicks
Platform: mIRC
Published Nov 19, 2007
Updated Nov 20, 2007
$nicks complies a list of nicks based on the params you specify. Much more detailed explanation in code.
/*
** $nicks by brinxy **
** ------------------ **
** About **
** ----- **
** $nicks first compiles a list of all nicks in the channel. **
** This list is made based off of the paramaters in the prop. **
** Bascially an enhancement to $nick, which can ony handle one nick at a time **
** Syntax **
** ------ **
** $nicks(#channelname,N,N*)[.prop] **
** -N* means you can use multiple params in the identifier
** -.prop will be explained further
** Properties **
** ---------- **
** [.prop], as mentioned above, can be one of the following:
** - .pnick compiles the list including the .pnick as used in the $nick identifier; returning (~&@%+)
** - .aohvr complies the list based on $nick's aohvr properties.
** Examples **
** -------- **
** Let's say I Was on the channel #mirc with three nicks. The first nick named Nick1 as an op, the second nick Named Nick2 with a voice, and the third nick named Nick3 with just regular status.
** - $nicks(#mirc,1,32).o would return Nick1 because Nick1 is the only nick with an op, thus being the only nick in the list.
** - $nicks(#mirc,1,2,32).pnick would return @Nick1 and %Nick2 (assuming these are the only supported prefixes on the server)
** - $nicks(#mirc,1,3,32) would just return Nick1 Nick2 Nick3 because there are no special params.
*/
alias nicks {
if ( $me ison $1 ) {
var %ret, %x = 2
while (%x <= $0) {
var %t = $($+($,%x),2)
if ( !$regex(%t,/^[0-9]+$/gi) ) break
elseif ( !$nick($1,%t) ) break
else {
if ( $prop = pnick ) %ret = %ret $iif($left($nick($1,%t).pnick,1) != $left($nick($1,%t),1),$+($left($nick($1,%t).pnick,1),$nick($1,%t)),$nick($1,%t))
elseif ( $prop isin aohvr ) %ret = %ret $nick($1,%t,$prop)
else %ret = %ret $nick($1, %t)
}
inc %x
}
return %ret
}
}