Well, easy tweak:
on *:connect:$id alias id { var %id msg nickserv identify $$?="Enter your NickServ password." $iif($isid,return %id,%id) }