Some servers with nickserv allow to do /nickserv <command> instead of /msg nickserv <command>. (Ofcourse, if you have such an alias, use /raw -q nickserv <command>) This is a little more secure since other people can't /nick nickserv during netsplits or on other networks without services and thus get your password...

My auto-identification looks something like this:
Code:
on *:connect:id

alias id {
  var %mypass = mypassword
  if ($isid) return %mypass
  if ($network isin Strange1;Strange2) var %mypass = $left($md5($+(%mypass,$v1)),16)
  if ($network isin Network1;Network2;Strange1;Strange2) .nickserv identify %mypass
  elseif ($network == Quakenet) {
    .msg Q@CServe.quakenet.org AUTH $nick %mypass
    .mode $me +x
  }
  ; etc...
}