Last Seen Script

By SomeMessyScripter on Aug 01, 2009

Just a script I put together, measures time since the person has lasted joined, a little like service bots do. I will be changing it to hostmark at some point to make it more accurate, feel free to edit it.

«16:34:26» <@Lexxyy> !lastseen Lexxyy
«16:34:26» -Raaawwr- Lexxyy last joined here 9mins 14secs ago.

Obviously you could edit to do if ( $2 == $nick ) $iif($left($1,1) == !,notice $nick,msg $chan) are you looking for yourself?
and stuff like that :)

~Lex

P.S In line 3 I set the $ctime variable as %lastime just cause It makes the $calc less confusing.

on $*:TEXT:/^[!@]lastseen */Si:#:{
  if ( %ls. [ $+ [ $chan ] $+ [ $2 ] ] != $null ) {
    set %lastime %ls. [ $+ [ $chan ] $+ [ $2 ] ] 
    $iif($left($1,1) == !,notice $nick,msg $chan) $2 last joined here $duration($calc( $ctime - %lastime )) ago
    unset %lastime
  }
  elseif ( %ls. [ $+ [ $chan ] $+ [ $2 ] ] = $null ) {
    $iif($left($1,1) == !,notice $nick,msg $chan) $2 has not been seen in this channel.
} }
on *:join:#:{
  set %ls. $+ $chan $+ $nick $ctime
}

Comments

Sign in to comment.
SomeMessyScripter   -  Aug 04, 2009

Clever you :D:D

 Respond  
asakura   -  Aug 02, 2009

loool i prefer to ask has anyone seen ???? :D

 Respond  
VinX   -  Aug 02, 2009

there are so many xSeen versions ... nuthin unique in this

 Respond  
Jethro   -  Aug 01, 2009

Well, I think it'd be better if you used hash tables, because using variables could be limited in storage over time when the allowed capacity is reached.

 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.