You're missing the point.

On QUIT - Occurs after the user (yourself) disconnects from the server:

example:
on *:QUIT: { /echo -s I quit! }

And you type:
/disconnect

The following would occur in the status window:
* Disconnected
I Quit!

--

on EXIT - Occurs just before mirc window closes

This is generally for cleanup, or any kind of statistics you want to enter. Most scripts take this opportunity to set a variable here, and on startup check for that variable. If it exists, it was a "clean" exit, not a crash. You can also remove variable that were only being used for the active session of mirc, or perhaps variables that change on startup.

Whatever the case may be, if you've reached this point, you are not connected to any servers. Thus /msg won't work, nor will nick, /kick, /ban, /notice, /query, or any other identifier of or relating to a server.