Okay, I have this for more networks. If you want auto nickserv and oper password to be automatic, this works well!

on *:CONNECT:{
if ($network == Network1) {
nickserv identify password
oper username password
join #chan1,#chan2,#chan3
}

elseif ($network == Network2) {
nickserv identify ...
join #chan,#chan2,#chan3,...
}
;and so on
}