Mini Seen

By naja on Apr 12, 2005

script for seen, nothing to do ;P~

on *:join:#:{
  if (%iseen != 0) {
    if ($readini(logs/seen.ini,seen,$mask($fulladdress,1))) {
      if ($gettok($readini(logs/seen.ini,seen,$mask($fulladdress,1)),1,32) == $nick) { remini logs/seen.ini seen $mask($fulladdress,1) | goto end }
      if ($gettok($readini(logs/seen.ini,seen,$mask($fulladdress,1)),1,32) != $nick) {
        %seen.nick = $gettok($readini(logs/seen.ini,seen,$mask($fulladdress,1)),1,32) 
        %seen.time = $gettok($readini(logs/seen.ini,seen,$mask($fulladdress,1)),2,32)
        %seen.time = $duration($calc($ctime - %seen.time))
        %seen.text =  $+ $color(notify) $+ [ $+ $color(own) $+ Seen! $+ $color(notify) $+ ]  $+ $color(own) $+ was %seen.time ago $nick Using nick  $+ $color(notify) $+ [ $+ $color(own) %seen.nick  $+ $color(notify) $+ ]
      }
    }
  }
  echo $chan  $+ $color(join) $+ [ $+ $color(notify) $+ x $+ $color(join) $+ ] $iif(%seen.text,%seen.text)
  unset %seen.*
  remini $logdirseen.ini seen $mask($fulladdress,1)
  :end
}
on *:part:#:{ 
  if ($nick != $me) { seen.write $mask($fulladdress,1) $nick } 
}
on *:quit:{ 
  if ($nick != $me) { seen.write $mask($fulladdress,1) $nick } 
}
on *:nick:{ 
  if ($nick != $me) { 
    if ($readini($logdirseen.ini,seen,$mask($fulladdress,1))) { .remini $logdirseen.ini seen $mask($fulladdress,1) } 
  } 
}
on *:kick:#:{ if ($knick != $me) { .seen.write $mask($fulladdress,1) $nick } }
alias seen.write {
  if ($lines(logs/seen.ini) > 550) { set %si 1
    :loop
    if (%si < 51) { write -dl2 logs/seen.ini | dec %si | goto loop }
    else { writeini logs/seen.ini seen $1 $2 $ctime }
  }
  else { writeini logs/seen.ini seen $1 $2 $ctime }
}

menu menubar,status,channel {
  -
  Seen $chr(9) $iif(%iseen == 1,Enable,Disable):%iseen = $iif(%iseen == 1,0,1)
  -
}

Comments

Sign in to comment.
DarthReven   -  Apr 20, 2005

Nice script very consice

 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.