So I've been thinking for like over an hour but did not arrive any conclusion with this script. I basically am trying to add a "status check" for 3 IRC servers via mIRC sockets. The problem I'm facing is that the execution jumps over to the next step without the socket connection being completed hence it returns a false value i.e Offline.
I tried using timer before goto commands but that returns ' not found'
Code:
on *:text:!stats:#: {
sockopen IRCAurora aurora.irchound.tk 6667
sockopen IRCKepler kepler.irchound.tk 6667
sockopen IRCJupiter jupiter.irchound.tk 6667
sockpause IRCAurora
sockpause IRCKepler
sockpause IRCJupiter
:true
msg $chan ----STATUS----
goto check1
halt
:check1
if ($sock(IRCAurora,pause) == 1) {
msg $chan 1Aurora - 9Online
}
else {
msg $chan 1Aurora - 4Offline
}
goto check2
halt
:check2
if ($sock(IRCJupiter,pause) == 1) {
msg $chan 1Jupiter - 9Online
}
else {
msg $chan 1Jupiter - 4Offline
}
goto check3
halt
:check3
if ($sock(IRCKepler,pause) == 1) {
msg $chan 1Kepler - 9Online
}
else {
msg $chan 1Kepler - 4Offline
}
halt
}
I know one solution is simply set up a php bot, but I want it on mIRC.
Any help would be appreciated. Thanks in advance.