alias hadd {
if (-*u* iswm $1) && (($hget($2) != $null) || (-*m* iswm $1)) && ($3 != $null) && (-*r* iswm $1) {
var %t = $+(.timer,_hexp,$ticks)
%t -hi 0 500 _hexp $2 $3 %t
hadd -m hexpire $+($2,$3) $4-
}
hadd $1-
}
alias -l _hexp {
if ($hget($1,$2) != $null) return
$3 off
hadd hexpire table $1
hadd hexpire item $2
.signal -n hexpire $hget(hexpire,$+($1,$2))
}
alias table return $hget(hexpire,table)
alias item return $hget(hexpire,item)
; Example code to test it
on *:signal:hexpire: {
echo -a table: $table
echo -a item: $item
echo -a value: $1-
}