Load this into your bot's remotes and it'll do the rest itself.
Monitors when people come in and leave the room, when they say something or perform an action in the room, also tracks nick changes
Usage: !seen nick
Also shows who was looking for them when they arrive in the room.
I've tested this to the best of my ability without any problems, but I don't guarantee that all possibilities were covered.
Written for mIRC 6.16..might work with lower versions, but I don't have any lower versions to test it with.
;Seen snippet v. 2.0 by Russel Bairstow (RusselB)
;last changes Apr. 27, 2005
on *:start:{
.hmake seen 100
if $exists(seen.hsh) { .hload seen seen.hsh }
}
on *:connect:{
if !$hget(seen) { .hmake seen 100 }
if $exists(seen.hsh) { .hload seen seen.hsh }
}
on *:exit:{ hsave -o seen seen.hsh }
on *:disconnect:{ hsave -o seen seen.hsh }
on !*:join:#:{
hadd -m seen $+(Name,$address) $addtok($hget(seen,$+(Name,$address)),$nick,32)
hadd -m seen $+(Join,$address) $ctime
hadd -m seen $+(Room,$address) $chan
if $hget(seen,$+(seen,$address)) {
.msg $nick The following people have been looking for you: $hget(seen,$+(seen,$address))
.hadd -m seen $+(seen,$address)
}
}
on *:text:!seen &:*:{
hadd -m seen $+(Text,$address) $ctime
var %address = $hfind(seen,$+(Name,$right($address($2,3),-3)),1,w)
var %chan = $hget(seen,$+(Room,%address))
if $2 ison %chan {
var %text = $hget(seen,$+(Text,%address))
var %action = $hget(seen,$+(Action,%address))
var %msg = $iif((%text > %action),saying something at $asctime(%text),performing an action at $asctime(%action))
.msg $nick I last saw $2 %msg
}
else {
hadd -m seen $+(seen,%address) $addtok($hget(seen,$+(Seen,%address)),$nick,32)
var %part = $gettok($hget(seen,$+(Part,%address)),1,32)
var %quit = $gettok($hget(seen,$+(Quit,%address)),1,32)
var %kick = $gettok($hget(seen,$+(Kick,%address)),1,32)
if (%part > %quit) && (%part > %kick) { .msg $nick I last saw $2 parting %chan at $asctime(%part) with the message $remtok($hget(seen,$+(Part,%address)),$gettok($hget(seen,$+(Part,%address)),1,32),1,32) }
elseif (%quit > %part) && (%quit > %kick) { .msg $nick I last saw $2 quitting %chan at $asctime(%quit) with the message $remtok($hget(seen,$+(Quit,%address)),$gettok($hget(seen,$+(Quit,%address)),1,32),1,32) }
else .msg $nick I last saw $2 being kicked from %chan at $asctime(%kick) by $gettok($hget(seen,$+(Kick,%address)),-1,32)
}
}
on *:text:*:*:{ hadd -m seen $+(Text,$address) $ctime }
on *:nick:{ hadd -m seen $+(Name,$address) $addtok($hget(seen,$+(Name,$address)),$newnick,32) }
on *:action:*:*:{ hadd -m seen $+(Action,$address) $ctime }
on *:part:#:{
hadd -m seen $+(Part,$address) $ctime $1-
hsave -o seen seen.hsh
}
on *:quit:{
hadd -m seen $+(Quit,$address) $ctime $1-
hsave -o seen seen.hsh
}
on *:kick:#:{
hadd -m seen $+($knick,$gettok($address($knick,5),2,33)) $ctime $nick
hsave -o seen seen.hsh
}
http://www.oldversion.com/program.php?n=mirc - thats the direct link. mirc 2.1 - mirc 6.15