Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!seen*:#:{
- if (!$2) { halt }
- else {
- var %seen.entry = $hget(LastSeen,$2), %seen.action = $null, %seen.name = $2
- if ($nick == $2) { msg $chan Yeah, I think you're here CoolStoryBob | halt }
- elseif ($2 == $me) { describe $chan *waves to $nick $+ * | halt }
- elseif ($2 ison $chan) { msg $chan $2 is currently in the channel! | halt }
- elseif (!%seen.entry) {
- var %seen.num = $hfind(LastSeen,* $+ $2 $+ *,0,w)
- if (%seen.num == 0) {
- timer 1 1 msg $chan I have not recently seen $2 $+ .
- halt
- }
- else {
- var %seen.i = 1
- while (%seen.i <= $hfind(LastSeen,* $+ $2 $+ *,0,w)) {
- write LastSeen.tmp $hfind(LastSeen,* $+ $2 $+ *,%seen.i,w) $hget(LastSeen,$hfind(LastSeen,* $+ $2 $+ *,%seen.i,w))
- inc %seen.i
- }
- filter -ffteu 3 32 LastSeen.tmp LastSeen2.tmp *
- timer 1 1 msg $chan I found %seen.num results for your LastSeen query. $iif(%seen.num > 5,Here are the top 5,Here are the results) $+ , starting with the newest result: $gettok($read(LastSeen2.tmp,1),1,32) $gettok($read(LastSeen2.tmp,2),1,32) $gettok($read(LastSeen2.tmp,3),1,32) $gettok($read(LastSeen2.tmp,4),1,32) $gettok($read(LastSeen2.tmp,5),1,32)
- %seen.name = $gettok($read(LastSeen2.tmp,1),1,32)
- .remove LastSeen.tmp
- .remove LastSeen2.tmp
- }
- }
- %seen.entry = $hget(LastSeen,%seen.name)
- %seen.action = $replace($gettok(%seen.entry,3,32),JOIN,joining $gettok(%seen.entry,4,32) $+ .)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),TEXT,talking in $gettok(%seen.entry,4,32) $+ . They were saying: $gettok(%seen.entry,5-,32)),%seen.action)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),ACT,acting in $gettok(%seen.entry,4,32) $+ . They were saying: * $2 $gettok(%seen.entry,5-,32)),%seen.action)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),PART,parting from $gettok(%seen.entry,4,32) $+ $chr(44) stating: $gettok(%seen.entry,5-,32)),%seen.action)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),QUIT,quitting from IRC $+ $chr(44) saying: $gettok(%seen.entry,4-,32)),%seen.action)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),KICKED,being kicked from $gettok(%seen.entry,5,32) by $gettok(%seen.entry,4,32) $+ $chr(44) who stated: $gettok(%seen.entry,6-,32)),%seen.action)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),KICK,kicking $gettok(%seen.entry,4,32) from $gettok(%seen.entry,5,32) $+ $chr(44) stating: $gettok(%seen.entry,6-,32)),%seen.action)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),FROMNICK,changing nicknames from their old nick $+ $chr(44) which was $gettok(%seen.entry,4,32) $+ .),%seen.action)
- %seen.action = $iif(%seen.action == $gettok(%seen.entry,3,32),$replace($gettok(%seen.entry,3,32),CHNICK,changing their nickname to $gettok(%seen.entry,4,32) $+ .),%seen.action)
- %seen.entry = $+ %seen.name Is currently not in the channel, I last seen them type in chat $duration($calc($ctime - $gettok(%seen.entry,2,32))) ago.
- timer 1 1 msg $chan %seen.entry
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement