/help $scon
You can use it to list all of the connections to IRC servers the mIRC you use it in has, and information about them.
$scon(0) returns the number of connections, $scon(1) returns the connection ID of the first connection and $scon(1).status returns $status of the first connection.