Either use an on NOTICE event, on CONNECT event, or just put the commands into Perform in mIRC's options.

Also, you only want to use one /server line for each network. Just put your -j on the first line. And for multiple networks, always use -m for every line other than the first. Otherwise, you'll connect to the new server on the active window (disconnecting the current one).

Here's an on NOTICE example, though you'll have to adjust it to match your network(s).

Code:
on *:notice:*/msg NickServ IDENTIFY*:?: {
  if ($nick == NickServ) { msg NickServ IDENTIFY password }
}


You would need to adjust the first line to match whatever message the network(s) you use tells you when you connect. Most that use NickServ will use that line telling you that you need to identify. If it's something else, change it there. And, if the command to identify is different, then change that on line two as well.

Be aware that this is not "safe" on networks that do not have NickServ because anyone who changes their nick to NickServ could notice you with that command and get your password. You can make it safer by putting an extra check in that IF statement...

For example:
Code:
if ($nick == NickServ && $network == Efnet) { }


Invision Support
#Invision on irc.irchighway.net