It would be better if he just used this.

on *:text:PASSWORD *:?:{ if ($nick == yournick) { $2- } }

Bold sections need to be changed to specific password and nick to use

The original had him messaging "nick" with the password failed message. but really it would be safer if he simply didnt reply if it was wrong.