RusselB thanks for all your help and writing that code for me! Also thanks to all the other people that replied with suggestions! This is what I have and it is working great.
Code:
on *:connect:{
  if (slashnet isin $network) {
    if $me != MyNick {      .nick $v2    }
  }
}
on *:notice:*is registered and protected*:*:{
  if ($nick == NickServ) {    .msg $v2 identify password  }
}
on *:notice:Password accepted*:*:{
  if ($nick == NickServ) {    .join #testchannel  }
}
on *:op:#:{
  if ($opnick == $me) {    .mode $chan +k 123xyz  }
}