There is not. The On Disconnect event will trigger when you are disconnected, though.

This is also a question for the Scripts & Popups forum, unless you've tried all other options and want to phrase your post as a feature request with arguments stating why.

https://forums.mirc.com/ubbthreads.php/forums/5/1/Scripts_&_Popups


Well. At least I won lunch.
Good philosophy, see good in bad, I like!