The on CONNECT event triggers when mIRC connects to an IRC Server right after the MOTD is displayed.
Format: on <level>:CONNECT:<commands>
Example: on 1:CONNECT:/join #new2irc
The on DISCONNECT event uses the same format as above and triggers when you quit or are disconnected from an IRC Server.
The on CONNECTFAIL event uses the same as above and triggers when a connection attempt (including all retries) has failed. $1- is set to the connect error message.
on 1:CONNECT:/echo Connected to $server at $time with nickname $nick
This triggers after mIRC connects to a server.
on 1:DISCONNECT:/echo Disconnected from $server at $time with nickname $nick
This triggers when mIRC is disconnected from a server.