mIRC Home    About    Download    Register    News    Help

Print Thread
Request script on disconnection #218086 01/02/10 09:50 AM
Joined: Feb 2010
Posts: 7
Cristian_Xtris Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Feb 2010
Posts: 7
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.


User of Xtris Network.
Re: Request script on disconnection [Re: Cristian_Xtris] #218090 01/02/10 11:10 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Request script on disconnection [Re: Riamus2] #218095 01/02/10 02:21 PM
Joined: Feb 2010
Posts: 7
Cristian_Xtris Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Feb 2010
Posts: 7
Thank you for the information.


User of Xtris Network.