That goes into your Remotes (Alt + R)

Please note that most networks ask/require the information when you connect rather than when you join a specific channel. Also the code given would send the same password no matter what network you were on.

Personally, I use the following (with the specific details hidden)
Code:
on *:notice:*nick* is registered*:*:{
  if ($istok(network1 network2 network3,$network,32) && ($nick == nickserv) {        .msg $v2 identify <password>     }
}

Note that this does require you to use the same password on each network. If you use different passwords on each network then the code would have to be changed.

Replace network1 network2 network3 with the appropriate network names and <password> with the appropriate password.