Seen & Notification

By RusselB on Apr 27, 2005

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
} 

Comments

Sign in to comment.
juuruichki   -  Jan 01, 2008

lol it does the same thing for me

 Respond  
AHBARAR   -  Jun 29, 2007

i have problem i paste it in my bot and its just stuck saying tht nick is being kicked from at by

 Respond  
xDaeMoN   -  Jun 29, 2007

It will save the last thing it saw.

 Respond  
AHBARAR   -  Jun 29, 2007

just more Question sry .. how muct time it need to save the seen of the day cas maybe u had to leave early and closed the bot for example or got dc .. will it save last thing it saw or need a period of time to save

 Respond  
xDaeMoN   -  Jun 28, 2007

On every event, it will save the hash to the file. When I said event, it means when the nick joins a channel, parts, quits, changes nick, get kicked or send a message to the channel.

 Respond  
AHBARAR   -  Jun 28, 2007

Does it save from yesterday till many days or just every day by it self

 Respond  
nobody   -  Apr 27, 2005

Nice coding. Overall: Great work.

 Respond  
Yoinx   -  Apr 27, 2005

http://www.oldversion.com/program.php?n=mirc - thats the direct link. mirc 2.1 - mirc 6.15

 Respond  
Yoinx   -  Apr 27, 2005

if you would like an old version to test with www.oldversion.com they archive old versions of stuff (mirc included)\

 Respond  
RusselB   -  Apr 27, 2005

Thanks DarthReven

 Respond  
DarthReven   -  Apr 27, 2005

nice lil seen addon

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.