In fact this is the script I use to keep my instances in check.

Rather than exiting, I use the check to avoid any initialization:

Code:
on *:START: { 
  if ($count_processes(mirc%.exe) <= 1) {
    server irc.server.com ...
    server irc.server2.com
  }
}


This way I could start multiple instances of mIRC but without automatically creating multiple connections. Very useful for debugging, especially when testing different versions of the client.

In that sense, it would be equally useful for mIRC to expose a builtin identifier to give us the number of running mIRC processes so we can use this check in our scripts.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"