Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:TEXT:*:#soda: {
- if ($1 == .tell) {
- if (!%telldelay) {
- set -u5 %telldelay 1
- var %id = $left($ticks,4)
- set $+(%,tell,$2) 1
- hadd tells $+($2,-,%id) $nick $ctime $3-
- hsave tells tells.hsh
- .timer 1 1 msg $chan $2 Will be notified as soon as they're active here.
- .timer 1 2 .notice $nick Do .untell %id to cancel the msg.
- }
- }
- if ($1 == .untell) {
- var %u = $gettok($hget(tells,$+($2,-,$3)),1,32)
- if (%u == $nick) {
- hdel tells $+($2,-,$3)
- hsave tells tells.hsh
- .timer 1 1 msg $chan Message $3 to $2 has been successfully deleted.
- }
- elseif (!%u) { msg $chan No such message id found. }
- elseif (%u) && (%u != $nick) { .msg OrFeAsGr $nick attempted to remove someone else's message. $+(<,$nick,>) .untell $2 $3 }
- }
- else {
- if ($($+(%,tell,$nick),2)) {
- var %tells = $hget(tells,0).item
- while (%tells) {
- var %item = $hget(tells,%tells).item
- if ($+(*,$nick,-,*) iswm %item) {
- var %get = $hget(tells,%tells).data
- var %teller = $gettok(%get,1,32)
- var %tellago = $duration($calc($ctime - $gettok(%get,2,32)))
- var %tellmsg = $gettok(%get,3-,32)
- .timer 1 %tells msg $chan $+($nick,:) %tellago ago $+(<,%teller,>) %tellmsg
- hdel tells %item
- }
- dec %tells
- }
- unset $+(%,tell,$nick)
- }
- }
- }
- ON *:ACTION:*:#soda: {
- if ($($+(%,tell,$nick),2)) {
- ar %tells = $hget(tells,0).item
- while (%tells) {
- var %item = $hget(tells,%tells).item
- if ($+(*,$nick,-,*) iswm %item) {
- var %get = $hget(tells,%tells).data
- var %teller = $gettok(%get,1,32)
- var %tellago = $duration($calc($ctime - $gettok(%get,2,32)))
- var %tellmsg = $gettok(%get,3-,32)
- .timer 1 %tells msg $chan $+($nick,:) %tellago ago $+(<,%teller,>) %tellmsg
- hdel tells %item
- }
- dec %tells
- }
- unset $+(%,tell,$nick)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement