Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:.countdown:#: {
- if (!%cdown) {
- countdown
- set -u5 %cdown
- }
- }
- alias countdown {
- if ($gettok($date,2,47) <= 11) { var %hcdate Dec 25 00:00:00 $time(yyyy) | msg $chan There is $duration($calc($ctime(%hcdate) - $ctime)) Until Christmas | halt }
- if ($gettok($date,2,47) == 12) && ($gettok($date,1,47) >= 25) { msg $chan There is $calc(31 - $gettok($date,1,47)) Days $calc(23 - $gettok($asctime(HH:nn:ss),1,58)) Hours $calc(59 - $gettok($asctime(HH:nn:ss),2,58)) Minutes $calc(60 - $gettok($asctime(HH:nn:ss),3,58)) Seconds Till New Years | halt }
- else { amsg There is $calc(24 - $gettok($date,1,47)) Days $calc(23 - $gettok($asctime(HH:nn:ss),1,58)) Hours $calc(59 - $gettok($asctime(HH:nn:ss),2,58)) Mins $calc(60 - $gettok($asctime(HH:nn:ss),3,58)) Seconds Until Christmas | halt }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement