mIRC Homepage
Posted By: Cristian_Xtris Request script on disconnection - 01/02/10 09:50 AM
Can there be set a script to react on disconnection and quit from server or program close?

I need to set something like this: on *:DISCONNECT:/part #test.
The problem is: it does not part the channel #test before it disconnects, it just disconnects. What I need is to part that channel, and only then disconnect (or close, or quit).
I think some sort of delay, for a few seconds, on disconnections quits and closes would come in handy, enough time for mirc to process that /part first.

If anybody can help, please help me on this.
Thank you.
Posted By: Riamus2 Re: Request script on disconnection - 01/02/10 11:10 AM
You'd have to part before disconnecting. If you don't want to manually do that, then you can make an alias that will do it.

Code:
alias disconnect { part #whatever_channel | quit }


That, of course, won't cause you to part the channel if you're disconnected for some other reason, such as netsplit, ping time out, etc. on DISCONNECT only triggers WHEN you disconnect and by then it's too late to part a channel.
Posted By: Cristian_Xtris Re: Request script on disconnection - 01/02/10 02:21 PM
Thank you for the information.
© mIRC Discussion Forums