menu * {
Nick Message Notification
.Notify List has $iif($hget(Watch,Notify) = 1,1 entry,$iif($hget(Watch,Notify),$v1,no) entries)
..$iif($hget(Watch,Notify),Add,Set) Notification Nick : notify.list add $input(Notification Nick,e,Add Notification Nick,$iif($1,$1,$me))
..$iif($hget(Watch,Notify),Remove Notification Nick) : notify.list del $input(Notification Nick,e,Remove Notification Nick,$iif($1,$1,$me))
.-
.$iif($hget(Watch,Notify),Select Nick) : noop
..$submenu($Notify_Nicks($1))
}
alias -l notify_nicks {
$iif(Notify.* iswm $hget(Watch,$1).item,return $gettok($v2,-1,46))
}
alias -l notify.list {
var %nicks = $replace($2-,$chr(44),$chr(32)), %a = 1, %b = $numtok(%nicks,32)
while %a <= %b {
$iif($1 == add,.hadd -m,.hdel) Watch $+(Notify.,$gettok(%nicks,%a,32)) $true
inc %a
.hinc Watch Notify
}
}