Hello,
This really doesn't pertain just to IRCX I don't think, but I've been coding it for VSIXc, so I posted this here. Anyway, I'm trying to get a snippet to echo my notify list depending on their online/offline status. E.g. Here is my current notify list:
User1 (Online)
User2 (Offline)
User3 (Online)
What I want to do is make it so I can echo the notify list with the online users first and then the offline users. E.g.:
User1 (Online)
User3 (Online)
User2 (Offline)
the code I'm using is totally stumping me because the output of it is this:
err0r (Online)ik000ike (Online)
ozzy10 (Online)
Warrior124 (Online)
X-Fusion (Online)
0 (Offline)
----------------------------------------------------------
Now that last person who is offline's name is really 'fdsa' yet the script is returning '0'. I don't know why it's returning 0, but it is. If anyone can take a look at my code, review it, edit and fix it, it would be greatly appreciated. Thanks to X-Fusion for giving me a handle on how to actually start this while loop. I never knew about $notify untill he told me about it. You will be credited in source code of a script that will never be released. :\
alias nlist.gen {
var %i 1
var %x 0
var %y 1
while (%i <= $notify(0)) {
if ($notify(%i).ison) {
echo -a $notify(%i) (Online)
}
elseif (!$notify(%i).ison) {
set %notify.offline. $+ %x $notify(%i)
inc %x
}
inc %i
}
while (%y <= %x) {
;echo -a %x
;echo -a %y
echo -a $+(%notify.offline.,$calc(%y-1)) (Offline)
unset %notify.offline. $+ %y
inc %y
}
echo -a ----------------------------------------------------------
}
Thanks in advanced,
Josh