A Seen script that has a seen notification.
Paste into remotes.
After you have pasted and saved either restart mIRC or type
'/hmake xSeen 100' into your status window.
Usage: /seen nick
other users can type: !seen nick
Credits: Tye, for his Simple Seen System and to the
authors of Gseen and Bseen tcls.
Update: Allows you to use wildcards. ( i.e. !seen mask or /seen mask )
;================================================
; xSeen
; Version 2.7
; Written by: xDaeMoN
; Email: xdaemon@xdaemon.us
;
; Usage: /seen <nick|*mask*>
; other users can type: !seen nick
;
; ** Credits: Tye, for his Simple Seen System and to the
authors of Gseen and Bseen tcls.
;
;================================================
;####################### EVENTS #######################
On *:START: {
if ( !$hget(xSeen) ) hmake xSeen 100
if ($isfile($_seen.log)) hload xSeen $_seen.log
}
On *:EXIT: if ( $hget(xSeen) ) hsave -o xSeen $_seen.log
#xSeen on
ON *:TEXT:*:#: {
xseen.add $+(seen.,$network,.,$address($nick,5)) text $ctime $chan
if ($1 == !seen) && ( $$2 ) {
if ( $2 == $me ) msg $chan $seenmsg.me($nick)
elseif ( $2 == $nick ) msg $chan $seenmsg.self2($nick)
elseif ($2 ison $chan) msg $chan $seenmsg.here($nick,$2)
else msg $chan $nick $+ , $seenpar($+(seen.,$network,.,$2),$+(nseen.,$network,.,$2,.,$nick) $nick $ctime $chan $address)
}
}
ON *:ACTION:*:#: xseen.add $+(seen.,$network,.,$address($nick,5)) act $ctime $chan
ON *:QUIT: xseen.add $+(seen.,$network,.,$address($nick,5)) quit $ctime $comchan($nick,1) $1-
on *:PART:#: xseen.add $+(seen.,$network,.,$address($nick,5)) part $ctime $chan $1-
on *:JOIN:#: {
xseen.add $+(seen.,$network,.,$address($nick,5)) join $ctime $chan $1-
nseen $+($network,.,$nick)
}
ON *:NICK: {
xseen.add $+(seen.,$network,.,$nick,!,$address) nick $ctime $comchan($newnick,1) $newnick
nseen $+($network,.,$newnick)
}
ON *:KICK:#: {
xseen.add $+(seen.,$network,.,$address($nick,5)) kicking $ctime $chan $knick $1-
xseen.add $+(seen.,$network,.,$address($knick,5)) kick $ctime $chan $nick $1-
}
#xSeen end
;####################### ALIASES #######################
alias -l xseen.add {
if ( $hfind(xSeen,$+($deltok($1,2,33),!*),1,w) ) {
if ( $v1 != $1 ) hdel xSeen $v1
}
hadd -m xSeen $1-
}
alias -l nseen {
var %n3 = $1, %n = $hfind(xSeen,$+(nseen.,$1,.,*),0,w), %n2, %n4 = 1
while %n {
%n2 = $hfind(xSeen,$+(nseen.,%n3,.,*),%n,w)
tokenize 32 $hget(xSeen,%n2)
.timer 1 $calc(%n3 * 2) .notice $gettok(%n3,2,46) $seenmsg.nseen($1,$4,$3,$!seentime( $2 ))
hdel xSeen %n2
inc %n4
dec %n
}
}
alias -l seenpar {
if ( $count($1,*,?) ) { return $seenparse2($1,$iif($2,$2-)) }
else return $seenparse3($1,$iif($2,$2))
}
alias -l seenparse {
tokenize 32 $1-
var %y = $hfind(xSeen,$+($1,!*),1,w), %x = $hget(xSeen,%y), %n = $deltok($gettok(%y,3,46),2,33), %m = $gettok(%y,2,33)
if (!%x) return $seenmsg.notseen($deltok($gettok($1,3,46),2,32))
if ( %n == $me ) return $seenmsg.me2
if ( $2 ) {
if ( $gettok($2,3,46) == $gettok($gettok($2,4,46),1,32) ) return $seenmsg.self
hadd xSeen $2-
}
tokenize 32 %x
if ($1 = text) { return $seenmsg.text(%n ,%m,$3,$seentime($2),$seen.onchan(%n,$3)) }
if ($1 = act) { return $seenmsg.act(%n,%m,$3,$seentime($2),$seen.onchan(%n,$3)) }
if ($1 = quit) { return $seenmsg.quit(%n,%m,$3,$seentime($2),$iif($4,stating $+($chr(40),$4-,$chr(41)))) }
if ($1 = part) { return $seenmsg.part(%n,%m,$3,$seentime($2),$iif($4,stating $+($chr(40),$4-,$chr(41)))) }
if ($1 = join) { return $seenmsg.join(%n,%m,$3,$seentime($2),$seen.onchan(%n,$3)) }
if ($1 = nick) { return $seenmsg.nick(%n,%m,$3,$4,$seentime($2),$seen.onchan($4,$3)) }
if ($1 = kicking) { return $seenmsg.kicking(%n,%m,$4,$3,$seentime($2),$+($5-,.),$seen.onchan(%n,$3)) }
if ($1 = kick) { return $seenmsg.kick(%n,%m,$3,$4,$seentime($2),$5-) }
}
alias -l seenparse2 {
tokenize 32 $1-
var %s3 = $1, %s = $hfind(xSeen,$1,0,w), %s2 = $deltok($hfind(xSeen,$1,1,w),2,33)
if ( !%s ) return $seenmsg.nomatch
elseif ( %s == 1 ) return $seenparse(%s2,$2-)
elseif ( %s < 40 ) {
return $seenparse.filter($+(%s,.,%s3),$2)
}
else return $seenmsg.manymatch(%s)
}
alias -l seenparse3 {
var %g5 = $1-, %r = $hfind(xSeen,$+($1,!*),1,w), %g3 = $+($gettok(%r,1-2,46),.,*!,$gettok($deltok($gettok(%r,3-,46),1,33),1,64),@*)
var %g = $hfind(xSeen,%g3,0,w)
if ( %g == 1 ) || ( !%r ) return $seenparse(%g5)
elseif ( %g < 40 ) {
return $seenparse.filter($+(%g,.,%g3),$2)
}
else return $seenmsg.manymatch(%g)
}
alias -l seenparse.filter {
var %j = $gettok($1,1,46), %j3 = $gettok($1,2-4,46), %sfile = _stemp, %j2, %j9, %j4
btrunc %sfile 0
while %j {
%j2 = $hfind(xSeen,%j3,%j,w)
write %sfile $deltok($gettok(%j2,3,46),2,33) $gettok($hget(xSeen,%j2),2,32)
dec %j
}
filter -cteuff 2 32 %sfile %sfile
var %k = 1, %k1
while $read(%sfile,%k) {
%k1 = $addtok(%k1,$gettok($v1,1,32),32)
inc %k
}
.remove %sfile
%j9 = $numtok(%k1,32)
%j4 = $gettok(%k1,1,32)
return $iif(%j9 > 1, I found %j9 matches to your query $+ $iif(%j9 > 1,$iif(%j9 >= 5,. Here are the 5 most recent) $&
(sorted): $iif(%j9 > 5, $gettok(%k1,1-5,32) $+ ., %k1 $+ .))) $seenparse($+(seen.,$network,.,%j4),$iif($2,$reptok($2,$gettok($2,3,46),%j4,1,46)))
}
alias seen {
if ( $1 ) echo $colour(info) -a *** $seenpar($+(seen.,$network,.,$1))
else echo $colour(info) -a * /seen: insufficient parameters
}
alias -l seen.version return 2.7
alias -l _seen.file return $+(",$scriptdirxSeen.ini,")
alias -l _seen.log return $+(",$scriptdirxSeen.dat,")
alias -l seentime return $replace($duration($calc($ctime - $1)),wk,$+($chr(32),week),day,$+($chr(32),day),hr,$+($chr(32),hour),min,$+($chr(32),minute),sec,$+($chr(32),second))
;####################### MENU #######################
menu * {
-
xSeen v $+ $seen.version
.$iif($group(#xSeen) == on,Disable,Enable) {
$iif($group(#xSeen) == on,.Disable,.Enable) #xSeen
echo $colour(info) -a ** xSeen $seen.version $iif($group(#xSeen) != on,DisableD,EnableD)
}
}
;####################### MESSAGES #######################
alias -l seenmsg.text return $1 ( $+ $2 $+ ) was last seen talking on $3 $4 ago. $5
alias -l seenmsg.act return $1 ( $+ $2 $+ ) was last seen acting on $3 $4 ago. $5
alias -l seenmsg.quit return $1 ( $+ $2 $+ ) was last seen quiting on $3 $4 ago $+($5,.)
alias -l seenmsg.part return $1 ( $+ $2 $+ ) was last seen leaving $3 $4 ago.
alias -l seenmsg.join return $1 ( $+ $2 $+ ) was last seen joining $3 $4 ago. $5
alias -l seenmsg.nick return $1 ( $+ $2 $+ ) was last seen changing nick on $3 to $4 $5 ago. $6
alias -l seenmsg.kicking return $1 ( $+ $2 $+ ) was last seen kicking $3 from $4 $5 ago with the reason: $+($6,.) $7
alias -l seenmsg.kick return $1 ( $+ $2 $+ ) was last seen kicked from $3 by $4 $5 with the reason: $+($6,.)
alias -l seenmsg.manymatch return I found $1 matches to your query; please refine it to see any output.
alias -l seenmsg.nomatch return No matches were found.
alias -l seenmsg.notseen return I have not seen $1 $+ .
alias -l seenmsg.me return $1 $+ , you found me!
alias -l seenmsg.me2 return I'm right here so quit wasting my time.
alias -l seenmsg.self return Looking for yourself, eh?!
alias -l seenmsg.self2 return $1 $+ , go look in the mirror!
alias -l seenmsg.here return $1 $+ , $2 is right here!
alias -l seenmsg.nseen return $1 ( $+ $2 $+ ) was looking for you on $3 $4 ago.
alias -l seen.onchan { if ( $1 ison $2 ) return $1 is still there. }
;####################### EOF #######################
It would be great if you could look for everything with wildcards.
like ltes say there is this dude quitting.
[13:20:03] * Quits: cooldry (cooldry@142-217-4-180.telebecinternet.net) (Read error: EOF from client)
and you know his host is .180.telebecinternet.net you want to use /seen 180.telebecinternet.net
Would rock.
er just a sugestion cos i know that have pretty much debuged this thing but when someone tries to see somthinge/someone you could amke that modifier in that command's modifier -m for it to automaticly make a hash table when you first make the table. but as i said u woked that out using the on start commnd :p
Never seen a better !seen system before! (@ http://mirc.net/projects.php?go=1135457129
http://mircscripts.org/comments.php?cid=2916 )
Very Impressive! Another great script by XDaeMon! Congratulations!
a 10/10 from me!
This is a good script!
I do have a question though...
I\'m a newbie about script so please be patient with me.
My question is I noticed you\'ve set a limit for this script, and whenever it hits 40 results it will just say to refine your search. So...is there anyway to get around that? like for example reload the log files but without removing others nickname logs?
Or maybe to reduce the number of hits?
Thanks
LoL Thats a good thing.
Add a advertise feature: .Advertise:/msg $active xSeen by:xDaeMoN http://www.hawkee.com/snippet.php?snippet_id=1252
Also: Some people on the server I use Really like the feature that gisve them all the names they had been.
IE: *** I found 5 matches to your query. Here are the 5 most recent (sorted): [SI]Raid Raidhaunting-dv
s-nightmares Raid [SI]Arruz [SI]Prophet. I\'m right here so quit wasting my time.
hey great seen script personally I wouldn\'t change the way it notify\'s because you will get a bunch of people typin it to find out how long that person has been gone if more than one wants to know kinda annoying also just wondering I use it on a bot and when I type !seen thenmynick it says mynick is right here shouldn\'t it say lookin for why am I lookin for myself or somethin? other than that perfect.