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.