If you connect to a server on a port other than the default port specified for that specific server in the server list & the connect fails, mIRC will retry the connection on the default port rather than the one specified in the connect command

If you have irc.freenode.net in your server list with a default port of +6697 & you use the command '/server irc.freenode.net:6667' & the first connect attempt fails mIRC will retry the connection on port +6697

The default port specified under ALT+O >> Connect >> Options does not effect this

If the server you're connecting to isn't in the server list it works as expected