Code:

on *:NOTICE:*This nickname is registered*:?: {
  if (($nick == NickServ) || ($nick == NickOp)) {
    .msg $nick identify password
  }
}