Code:
on *:START:{
  server irc.quakenet.net -i nick anick email realname
  server -m irc.utonet.org -i nick anick email realname
}
on *:CONNECT:{
  if ($network == QuakeNet) {
    join #chan1
    join #chan2
  }
  elseif ($network == UtoNet) {
    join #chan3
    join #chan4
  }
}

This could work. Make sure you check what $network should match. Just go to a window opened on one of the networks and type //echo -a $network and you'll see what you should match it to.