; $1 = *!user@address (from $mask($address, 0) in join event)
; $2 = $nick (from $nick in join event)
; returns nothing
alias watch {
var %existing $hget(WatchIAL, $1)
hadd -m WatchIAL $1 $addtok(%existing, $2, 44)
}
; $1 = nick1
; $2 = nick2
; call as identifer, returns $true if nick1 and nick2 are from the same user/address
; returns $false otherwise
alias isSameAs {
var %Index = 1
var %match = $hget(WatchIAL, $hfind(WatchIAL, $+(*, $1, *), 1, w).data)
while (%match != $null) {
if ($istok(%match, $1) && $istok(%match, $2)) return $true
inc %Index
set %match $hget(WatchIAL, $hfind(WatchIAL, $+(*, $1, *), %Index, w).data)
}
return $false
}