Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- � /nicks
- � by toggle^/Yigxi
- � Syntax
- � Not as an identifier
- � /nicks #channel (aohvr) [prop]
- � Example: (#Lunaranime contains 400 people at the moment with 20 ops, 12 voices, and 14 hops)
- � /nicks #Lunaranime ohv
- � ^ Returns those 20 ops, 12 voices, and 14 hops
- � /nicks #Lunaranime ohv pnick
- � ^ returns the 20 ops, 12 voices, and 14 hops including the .pnick (@,%,+)
- � Obviously we have 354 regular users left. Let's say 42 of them are idle.
- � /nicks #Lunaranime r idle
- � ^ returns the matching 42 nicks.
- � Basically, the properties in /nicks are equivilent to $nick's properties.
- � For quick reference:
- � a = all nicks, o = ops, h = halfops, v = voiced nicks, r = regular users
- � The color property will return the nicks color in the nicklist
- � Obviously, the pnick property will return the .pnick format of the nick.
- � The idle property returns the nicks that are idle out of your parameters.
- � As an identifier
- � $nicks(#channelname,aohvr,[pnick|color|idle]).[N|t]
- � ^ #channelname being the channel
- � ^ ahovr being our params.
- � ^ [pnick|color|idle] being even more specific params.
- � ^ [N] returns the Nth list of nicks (multiple lists are created for large channels)
- � ^ [t] returns the total number of lists, making it easier to know which lists to view.
- */
- alias nicks {
- if (!$1-2 || $me !ison $1 || $2 !isin aohvr) {
- $iif($isid,return $null,echo -ac info * /nicks: insufficient parameters)
- }
- var %x = 1, %u = 1
- if ($hget(nicks)) .hfree nicks
- .hmake nicks
- while (%x <= $nick($1,0,$2)) {
- if ($len($hget(nicks,$+(nicks,.,$1,.,%u))) > 900) inc %u
- hadd nicks $+(nicks,.,$1,.,%u) $hget(nicks,$+(nicks,.,$1,.,%u)) $iif($3,$($+($,nick($1,%x,$2),.,$3),2),$nick($1,%x,$2))
- inc %x
- }
- if (($isid) && ($prop)) return $iif($prop == t,$hget(nicks,0).item,$hget(nicks,$prop).data)
- else {
- var %t = 1
- while ($hget(nicks,%t).item) {
- echo -ac info2 -
- if (%t = 1 && !$hget(nicks,%t).data) {
- echo -ac info No matches.
- break
- }
- else echo -ac info $hget(nicks,%t).data
- inc %t
- }
- }
- }
Add Comment
Please, Sign In to add comment