alias list.notifys {
[color:green]; ------------------------------------------------------------------------------[/color]
[color:green]; This part reads the nick's statuses[/color]
[color:green]; ------------------------------------------------------------------------------[/color]
[color:green] [/color]
[color:green]; set number of connections[/color]
var %x = $scon(0)
[color:green]; loop through the connections[/color]
while (%x) {
[color:green]; set active connection[/color]
scon %x
[color:green]; set number of notified nicks[/color]
var %notify = $notify(0)
[color:green]; loop through the nicks[/color]
while (%notify) {
[color:green]; if online, add to %onlineN (N = connection id)[/color]
if ($notify(%notify).ison) set $+(%,online,%x) $eval($+(%,online,%x),2) $notify(%notify)
[color:green]; if not, add the user to %offline[/color]
elseif (!$istok(%offline,$notify(%notify),32)) set %offline %offline $notify(%notify)
dec %notify
}
dec %x
}
[color:green] [/color]
[color:green]; ------------------------------------------------------------------------------[/color]
[color:green]; This part displays the online nicks[/color]
[color:green]; ------------------------------------------------------------------------------[/color]
[color:green] [/color]
[color:green]; set number of connections[/color]
var %x = $scon(0)
[color:green]; loop through the connections[/color]
while (%x) {
[color:green]; set active connection[/color]
scon %x
echo -a online users on $scon(%x).network :
[color:green]; set number of online nicks for this connection id[/color]
var %y = $numtok($eval($+(%,online,%x),2),32)
[color:green]; loop through the nicks[/color]
while (%y) {
[color:green]; display the nick[/color]
echo -a $gettok($eval($+(%,online,%x),2),%y,32)
[color:green]; if the nick is also listed in %offline, remove it[/color]
if ($istok(%offline,$gettok($eval($+(%,online,%x),2),%y,32),32)) set %offline $remtok(%offline,$gettok($eval($+(%,online,%x),2),%y,32),1,32)
dec %y
}
dec %x
}
[color:green] [/color]
[color:green]; ------------------------------------------------------------------------------[/color]
[color:green]; This part displays the offline nicks[/color]
[color:green]; ------------------------------------------------------------------------------[/color]
[color:green] [/color]
echo -a offline users :
[color:green]; set number of offline nicks[/color]
var %y = $numtok(%offline,32)
[color:green]; loop through the nicks[/color]
while (%y) {
[color:green]; display the nick[/color]
echo -a $gettok(%offline,%y,32)
dec %y
}
[color:green]; clean up your mess[/color]
unset %*line*
}