Advertisement
ehhvans

Untitled

Dec 19th, 2016
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. on *:TEXT:!seen*:#:{
  2. if (!$2) { halt }
  3. else {
  4. var %seen.entry = $hget(LastSeen,$2), %seen.action = $null, %seen.name = $2
  5. if ($nick == $2) { msg $chan Yeah, I think you're here CoolStoryBob | halt }
  6. elseif ($2 == $me) { describe $chan *waves to $nick $+ * | halt }
  7. elseif ($2 ison $chan) { msg $chan $2 is currently in the channel! | halt }
  8. elseif (!%seen.entry) {
  9. var %seen.num = $hfind(LastSeen,* $+ $2 $+ *,0,w)
  10. if (%seen.num == 0) {
  11. timer 1 1 msg $chan I have not recently seen $2 $+ .
  12. halt
  13. }
  14. else {
  15. var %seen.i = 1
  16. while (%seen.i <= $hfind(LastSeen,* $+ $2 $+ *,0,w)) {
  17. write LastSeen.tmp $hfind(LastSeen,* $+ $2 $+ *,%seen.i,w) $hget(LastSeen,$hfind(LastSeen,* $+ $2 $+ *,%seen.i,w))
  18. inc %seen.i
  19. }
  20. filter -ffteu 3 32 LastSeen.tmp LastSeen2.tmp *
  21. 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)
  22. %seen.name = $gettok($read(LastSeen2.tmp,1),1,32)
  23. .remove LastSeen.tmp
  24. .remove LastSeen2.tmp
  25. }
  26. }
  27. %seen.entry = $hget(LastSeen,%seen.name)
  28. %seen.action = $replace($gettok(%seen.entry,3,32),JOIN,joining $gettok(%seen.entry,4,32) $+ .)
  29. %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)
  30. %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)
  31. %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)
  32. %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)
  33. %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)
  34. %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)
  35. %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)
  36. %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)
  37. %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.
  38. timer 1 1 msg $chan %seen.entry
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement