alias monitor {
var %1 $1-
if ($1 == list) {
var %a 1
echo -a * /monitor's list:
while ($timer(%a)) {
if (monitor* iswm $v1) {
echo -a $longfn($mid($v2,8))
}
inc %a
}
}
elseif ($1 == off) {
:del
if ($hget(monitor,$shortfn($2-))) {
if ($show) echo -a * /monitor: $2- has been removed from the watched list
hdel monitor $shortfn($2-)
}
.timermonitor $+ $shortfn($2-) off
}
elseif ($exists(%1)) {
if ($isid) {
tokenize 32 $hget(monitor,$shortfn(%1))
;to add the check on $md5 too, use "if ($file(%1).mtime > $2) && ($md5(%1,2) != $1) {"
if ($file(%1).mtime > $2) && ($md5(%1,2) != $1) {
msg # /me New follower! Welcome, $read(C:\Users\braze_000\Documents\TeeBoard\widgets\notifications\follower-last.txt) $+ !!!
}
}
elseif ($show) echo -a * /monitor: $1- has been added to the watched list
hadd -m monitor $shortfn(%1) $md5(%1,2) $file(%1).mtime
.timermonitor $+ $shortfn(%1) -m 0 100 noop $!monitor( %1 )
}
else .timer -h 1 0 monitor off %1
}