mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 20
H
hatch Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jan 2003
Posts: 20
Hi board!

When does the DISCONNECT event trigger? Right when I recently got disconnected or when I click disconnect from the icon bar.

My guess is, it triggers right after I really got disconnected by any means (if I get the helpfile right). Is there any event or possibility to check, whether I just clicked "disconnect" and do some scripting at this time BEFORE I really get disconnected?


__________________
"Who cares. Out of sight, out of mind."
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
on 1:DISCONNECT: {
/set -u0 %err $input(You were disconnected, ow, Disconnect)
}


-KingTomato
Joined: Jan 2003
Posts: 20
H
hatch Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jan 2003
Posts: 20
Thank you for your attention, but it does not help me out. Maybe I did not ask the smart way wink

What I actually want is a /msg nick I am disconnecting! when I click on the disconnect button.
Surely I cannot send any messages when I am not connected, but the DISCONNECT event triggers after I got disconnected, so I cannot send any messages from within this event. The msg has to be sent right before I actually get disconnected. I understand, that serverside disconnects like kills or g-lines will make this msg impossible, but it should be possible for clientside disconnects - I just can't figure out how to. I could use an alias to disconnect, but I don't really like this solution.


__________________
"Who cares. Out of sight, out of mind."
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
There is a way to do it, by taking advantage of the fact that mirc evaluates identifiers/variables in the quit message specified in Options.

Alt+O > IRC > Messages . Enter "$quitmsg" (without the quotes) in the "Quit message" box. Then make an alias like:
Code:
alias quitmsg {
  msg SomeNick I'm disconnecting!
  return This is my quit message
}
mirc will try to evaluate $quitmsg before sending a QUIT command, which means that it'll send PRIVMSG before QUIT.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Adding a /msg is a great idea smile
I never thought of this identifier beyond a one-line /return.

Joined: Jan 2003
Posts: 20
H
hatch Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Jan 2003
Posts: 20
Great idea, thank you a lot smile


__________________
"Who cares. Out of sight, out of mind."

Link Copied to Clipboard