Keeps track of the last time you saw a user.
; Paste into remotes.
; After you have pasted and saved either restart mIRC or type
; '/hmake seen 100' into your status window.
;
; Usage: /seen nick
; other users can type: !seen nick
;
; Tye @ DALnet/UnderNet (tye at mirc.net)
ON *:START: {
hmake seen 100
if ($isfile(seen.dat)) { hload seen seen.dat }
}
ON *:EXIT: {
if ($hget(seen)) { hsave -o seen seen.dat }
}
ON *:TEXT:*:#: {
hadd seen $nick text $chan $ctime $1-
if ($1 = !seen) {
if ($2 ison $chan) { msg $chan $2 is right here. }
else { msg $chan $nick $+ : $seenparse($2) }
}
}
alias seen {
echo $colour(info) -a *** $seenparse($1)
}
ON *:ACTION:*:#: {
hadd seen $nick act $chan $ctime $1-
}
ON *:QUIT: {
hadd seen $nick quit $ctime $1-
}
on *:PART:#: {
hadd seen $nick part $chan $ctime $1-
}
on *:JOIN:#: {
hadd seen $nick join $chan $ctime $1-
}
ON *:NICK: {
hadd seen $nick nick $newnick $ctime
}
ON *:KICK:#: {
hadd seen $nick kicking $chan $ctime $knick $1-
hadd seen $knick kick $chan $ctime $nick $1-
}
alias -l seenparse {
var %x = $hget(seen,$1)
if (!%x) { return I have not seen $1 }
var %n = $1
tokenize 32 %x
if ($1 = text) { return I last saw %n in $2 $duration($calc($ctime - $3)) ago saying $4- }
if ($1 = act) { return I last saw %n in $2 $duration($calc($ctime - $3)) ago acting $4- }
if ($1 = quit) { return I last saw %n quiting $duration($calc($ctime - $2)) ago $iif($3,with the message $3-) }
if ($1 = part) { return I last saw %n leaving $2 $duration($calc($ctime - $3)) ago with the message $4- }
if ($1 = join) { return I last saw %n joining $2 $duration($calc($ctime - $3)) ago. }
if ($1 = nick) { return I last saw %n changing their nickname to $2 $duration($calc($ctime - $3)) ago. }
if ($1 = kicking) { return I last saw %n kicking $4 from $2 $duration($calc($ctime - $3)) ago with the reason $5- }
if ($1 = kick) { return I last saw %n being kicked from $2 by $4 $duration($calc($ctime - $3)) with the reason $5- }
}
We provide all this bilgilerinn how a single command
!Seen Nick
Bot :
I last saw %n in $2 $duration($calc($ctime - $3)) ago saying $4- }
I last saw %n in $2 $duration($calc($ctime - $3)) ago acting $4- }
I last saw %n quiting $duration($calc($ctime - $2)) ago $iif($3,with the message $3-) }
I last saw %n leaving $2 $duration($calc($ctime - $3)) ago with the message $4- }
I last saw %n joining $2 $duration($calc($ctime - $3)) ago. }
I last saw %n changing their nickname to $2 $duration($calc($ctime - $3)) ago. }
not at all difficult! here's a quick update:
ON *:TEXT:*:#: {
hadd seen $nick text $chan $ctime $1-
if ($1 = !seen) {
if ($count($2, ?, *)) {
var %max = 5 | ; maximum number of results
var %i = 1, %n = $hfind(seen, $2, 0, w)
msg $chan $nick $+ : %n result $+ $iif(%n != 1, s) for $2. $iif(%n > %max, Showing first %max)
while (%i <= %max) && ($hfind(seen, $2, %i, w)) {
msg $chan $nick $+ : $seenparse($v1)
inc %i
}
}
elseif ($2 ison $chan) { msg $chan $2 is right here. }
else { msg $chan $nick $+ : $seenparse($2) }
}
}
replace the existing on TEXT event with that one. change %max if you like.
I modified mines a lil so that it wouldnt say \"NAME, is right here\" when you try and search for yourself.
ON :TEXT::#: {
hadd seen $nick text $chan $ctime $1-
if ($1 = !seen) { if ($2 == $nick) { msg $chan $nick $+ , Lost Yourself? }
elseif ($2 ison $chan) { msg $chan $2 $+ , is right here. }
else { msg $chan $nick $+ : $seenparse($2) }
}
}