um i would go with Snooop with an on connect but anyway and i dont know why anyone would want to do it this way but ohwell
useing $2- and you type the wrong thing will make it error so thats not a good idea also why did you use if ($chan) for.
anyways
on $*:TEXT:/^!ns\s(recover|release|ghost|id)$/iS:#: {
if ($nick isop #) {
.ns $iif($regml(1) == id,identify,$regml(1)) $iif($regml(1) != id,$me) PASSHERE
.notice $nick The following command was completed: ns $regml(1) PASSREMOVED
}
}