The ON CONNECT event is not server specific. It will activate no matter what server you connect to.
If you want specific commands done on specific servers/networks, then you can use the base ON CONNECT event, with if/elseif/else statements.
Alternatively, there is the Perform button/dialog in mIRC Options - Connect - Options - Perform, which can be set to work on a network by network basis.