mIRC Home    About    Download    Register    News    Help

Print Thread
$status in ON DISCONNECT #202250 18/07/08 07:48 PM
Joined: Nov 2004
Posts: 22
G
gencha Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Nov 2004
Posts: 22
If mIRC is closing, could $status return "exiting" or "quitting" in on DISCONNECT?
It would be very helpful for certain scripts that need to do cleanup on server disconnection /except/ when that disconnection is due to mIRC exiting. thanks

Re: $status in ON DISCONNECT [Re: gencha] #202799 30/07/08 01:00 PM
Joined: Jan 2004
Posts: 162
R
RRX Offline
Vogon poet
Offline
Vogon poet
R
Joined: Jan 2004
Posts: 162
I had the problem, when closing mIRC, that my script tried to reconnect everywhere, causing mIRC to freeze for dozens seconds before finally shutting down.
The on exit event is also triggered after the on disconnect ones so setting a flag there doesnt help.
I solved it with a menu item to close mIRC and by putting all connection related events inside a #group, which I .disable just before doing /exit.

So yes, this would be handy.

But not this way, these new values would break all scripts that would do something like
Code:
goto $status
:connecting
:disconnecting
:closing
:connected
:disconnected

..or use excluded-type conditions.

A new identifier $exiting (or $appexit, similar to $appstate etc) would be a better choice than a new $status value, since the closing of mIRC affects more than what is related to IRC server connections.