Yes you can try using this:

Code:
ON *:CONNECT: {
  if ($server == irc.testserver.net) {
    nick testnick
    .msg NickServ IDENTIFY 12345
    timer 1 3 join #mychan1,#mychan2
    mode $me +abc
  }
}


more information help about it try : /help on connect