Simple Seen Script

By tssguy1234 on Aug 06, 2009

Simple seen script by me.. Uses ini files. Currently a person has to leave/join the channel for the script to recognize them. I'm sure I could figure a way to fix this but I don't want to at the moment.

on *:JOIN:#:{
  writeini online.ini Online $nick true
}

on *:PART:#:{
  writeini online.ini Online $nick false
  writeini lastonline.ini Time $nick $time(h:nn TT)
}

on *:QUIT:{
  writeini online.ini Online $nick false
  writeini lastonline.ini Time $nick $time(h:nn TT)
}

on *:TEXT:!seen*:#:{
  if ($readini(online.ini,Online, $2 ) == true) {
    msg $chan Oh no! I think you're going blind! $2 is already online.
  } 
  else {
    if ($readini(online.ini,Online, $2 ) == false) {
      msg $chan I last saw $2 online at $readini(lastonline.ini, Time, $2)
    }
  }
} 

Comments

Sign in to comment.
Jethro   -  Sep 21, 2009

I reckon using hash tables is better than using ini for a seen script like this, which isn't hard to do the converting.

@Ghost-Writer, you can use more than one $iif followed by another $iif...just to make sure the comparisons and closing bracket are properly placed.

 Respond  
Ghost-writer   -  Sep 21, 2009

2 $iif statements in 1, thats a first. $iif(bla,$iif( <-- god damn intresting. lol :P. nice job but i still dont like it :D

 Respond  
Noutrious   -  Sep 20, 2009
on *:JOIN:#:writeini -n seen.ini seen $nick $ctime
on *:PART:#:writeini -n seen.ini seen $nick $ctime
on *:QUIT:writeini -n seen.ini seen $nick $ctime
on *:TEXT:*:*:{
writeini -n seen.ini seen $nick $ctime
if ($1 = !seen) $iif($chan,notice,msg) $nick $iif($2,$iif($readini(seen.ini,seen,$2),Seen $2 before $duration($calc($ctime - $v1),2) $+ .,Sorry $+ $chr(44) haven't seen $2 $+ .),Please specify user to check for.)
}

Tadaaaa!

 Respond  
Ghost-writer   -  Sep 19, 2009

lots of things gone wrong, i change my nick. were did i go?

 Respond  
Cazz   -  Sep 05, 2009

What?

 Respond  
GlobalAnomaly   -  Sep 04, 2009

God Cazz, triple posting with error code and code you personally like? :P

 Respond  
Halit   -  Sep 03, 2009
Jethro   -  Aug 07, 2009

Cazz, this is the correct format:

if ($nick isop $chan || $nick ishop $chan) {

or

if ($nick isop $chan) || ($nick ishop $chan) {
 Respond  
Cazz   -  Aug 07, 2009

You also add a spam protection using timers and vars, or some other techniquie.
AND add an enable/disable command for OP's.

if ($nick isop $chan) || if ($nick ishop $chan) {

That might work.

 Respond  
Cazz   -  Aug 07, 2009

You may want to use
if ($nick ison $chan) {
To see if the user is currently on the channel.

 Respond  
Cazz   -  Aug 07, 2009

You could use:
if ($nick ison $chan) {
To see if they are currently in the channel.

You might also want to put a spam protection script into that somehow. Possibly using timers and vars.

AND you may even want to have an enable/disable command.

 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.