Code:
on *:start: {
  .server irc.server.org
}


on *:CONNECT: {
  if ($network == network) { 
    join #channel1
    join #channel2
    perform other commands you like before you join a channel.
  }
}


on 1:JOIN:#:{
   if ($chan == #channel1) {
    do this command
    do that command
   }
   if ($chan == #channel2) {
    do this command
    do that command
  }
}



;############ replace irc.server.org with your actual server name
;############ replace network with your servers actual networkname
;############ replace #channel1(2) with the names of the channels you want to join

Good luck smile