mIRC has both of these functions..without scripts. There is no need for this. and if you really wanted it
on *:CONNECT:{ if ($network == NETWORK HERE) { join #chan1,#chan2,#chan3,#chan4,#etc } }