I wrote a script that connects/disconnects using own data (not mIRC's servers.ini) and I disabled mIRCs auto reconnect etc options to not interfere. For a script created server window, I always use its interface for this so the script knows if it initiated the connection/disconnection or not, in order to auto-reconnect after remote disconnection.
The problem is when I close mIRC using the window button, mIRC disconnects all connections and my script assumes they are remote disconnections so before mIRC finally closes its main window, I can see the script adds a whole bunch reconnection jobs which hogs up mIRC sometimes for like 10 sec when I allow more simultaneous connections and/or set small queue interval.
I couldn't find an identifier that indicates mirc is in the process of shutting down, and the on exit event seems to trigger after the disconnections and script reconnection attempts, so anyone knows another way to find out in a script?