Advertisement
OrFeAsGr

tells3

Dec 2nd, 2017
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.90 KB | None | 0 0
  1. ON *:TEXT:*:#soda: {
  2.   if ($1 == .tell) {
  3.     if (!%telldelay) {
  4.       set -u5 %telldelay 1
  5.       var %id = $left($ticks,4)
  6.       set $+(%,tell,$2) 1
  7.       hadd tells $+($2,-,%id) $nick $ctime $3-
  8.       hsave tells tells.hsh
  9.       .timer 1 1 msg $chan $2 Will be notified as soon as they're active here.
  10. .timer 1 2 .notice $nick Do .untell %id to cancel the msg.
  11.     }
  12.   }
  13. if ($1 == .untell) {
  14. var %u = $gettok($hget(tells,$+($2,-,$3)),1,32)
  15. if (%u == $nick) {
  16. hdel tells $+($2,-,$3)
  17. hsave tells tells.hsh
  18. .timer 1 1 msg $chan Message $3 to $2 has been successfully deleted.
  19. }
  20. elseif (!%u) { msg $chan No such message id found. }
  21. elseif (%u) && (%u != $nick) { .msg OrFeAsGr $nick attempted to remove someone else's message. $+(<,$nick,>) .untell $2 $3 }
  22. }
  23.   else {
  24.     if ($($+(%,tell,$nick),2)) {
  25.       var %tells = $hget(tells,0).item
  26.       while (%tells) {
  27.         var %item = $hget(tells,%tells).item
  28.        if ($+(*,$nick,-,*) iswm %item) {
  29.         var %get = $hget(tells,%tells).data
  30.         var %teller = $gettok(%get,1,32)
  31.         var %tellago = $duration($calc($ctime - $gettok(%get,2,32)))
  32.         var %tellmsg = $gettok(%get,3-,32)
  33.         .timer 1 %tells msg $chan $+($nick,:) %tellago ago $+(<,%teller,>) %tellmsg
  34.         hdel tells %item
  35. }
  36.         dec %tells
  37.       }
  38.       unset $+(%,tell,$nick)
  39.     }
  40.   }
  41. }
  42.  
  43. ON *:ACTION:*:#soda: {
  44.   if ($($+(%,tell,$nick),2)) {
  45. ar %tells = $hget(tells,0).item
  46.       while (%tells) {
  47.         var %item = $hget(tells,%tells).item
  48.        if ($+(*,$nick,-,*) iswm %item) {
  49.         var %get = $hget(tells,%tells).data
  50.         var %teller = $gettok(%get,1,32)
  51.         var %tellago = $duration($calc($ctime - $gettok(%get,2,32)))
  52.         var %tellmsg = $gettok(%get,3-,32)
  53.         .timer 1 %tells msg $chan $+($nick,:) %tellago ago $+(<,%teller,>) %tellmsg
  54.         hdel tells %item
  55. }
  56.         dec %tells
  57.       }
  58.       unset $+(%,tell,$nick)
  59.     }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement