Top

Seen & Notification


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  7.5 (of 4 scores)
Date Added  Apr 27, 2005
Last Updated  Apr 14, 2008
Tags  notification  seen 

Introduction

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.


Grab the Code

;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

  (12)  RSS
DarthReven
Comments: 468
 
mIRC Snippet:  Seen & Notification
Posted on Apr 27, 2005 3:42 pm
nice lil seen addon
RusselB
Comments: 151
 
mIRC Snippet:  Seen & Notification
Posted on Apr 27, 2005 4:59 pm
Thanks DarthReven
Yoinx
Comments: 424
 
mIRC Snippet:  Seen & Notification
Posted on Apr 27, 2005 7:25 pm
if you would like an old version to test with www.oldversion.com they archive old versions of stuff (mirc included)\
Yoinx
Comments: 424
 
mIRC Snippet:  Seen & Notification
Posted on Apr 27, 2005 7:26 pm
http://www.oldversion.com/program.php?n=mirc - thats the direct link. mirc 2.1 - mirc 6.15
nobody
Comments: 36
 
mIRC Snippet:  Seen & Notification
Posted on Apr 27, 2005 7:45 pm
Nice coding. Overall: Great work.
sith_
Comments: 10
 
mIRC Snippet:  Seen & Notification
Posted on Jun 28, 2007 5:51 am
it don't work for me lol, all it does is "I last saw $nick being kicked by"
AHBARAR
Comments: 167
 
mIRC Snippet:  Seen & Notification
Posted on Jun 28, 2007 3:56 pm
Does it save from yesterday till many days or just every day by it self
xDaeMoN
Comments: 695
 
mIRC Snippet:  Seen & Notification
Posted on Jun 28, 2007 4:04 pm
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.
AHBARAR
Comments: 167
 
mIRC Snippet:  Seen & Notification
Posted on Jun 29, 2007 9:15 am
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
xDaeMoN
Comments: 695
 
mIRC Snippet:  Seen & Notification
Posted on Jun 29, 2007 9:22 am
It will save the last thing it saw.
AHBARAR
Comments: 167
 
mIRC Snippet:  Seen & Notification
Posted on Jun 29, 2007 1:42 pm
i have problem i paste it in my bot and its just stuck saying tht nick is being kicked from at by
juuruichki
Comments: 9
 
mIRC Snippet:  Seen & Notification
Posted on Jan 1, 2008 3:58 am
lol it does the same thing for me

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom