diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-15 23:31:41 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-15 23:31:41 +0000 |
commit | 7449580c5e83e290942ebe38cc157a339224e70d (patch) | |
tree | c1035433db87d014756020ee48f9b5279daa10ae | |
parent | 6642e2b43c6ca135b91b25ce9ad80a45e6a4267e (diff) |
remind plugin: one-shot reminders gave a reminder time with an extra period added. Remove it, and add some minor optimizations
-rw-r--r-- | data/rbot/plugins/remind.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/data/rbot/plugins/remind.rb b/data/rbot/plugins/remind.rb index ca695a49..78b3c0f2 100644 --- a/data/rbot/plugins/remind.rb +++ b/data/rbot/plugins/remind.rb @@ -136,14 +136,12 @@ class RemindPlugin < Plugin if(repeat) @reminders[who][subject] = @bot.timer.add(period) { - time = Time.now + period - tstr = time.strftime("%H:%M:%S") + tstr = (Time.now + period).time.strftime("%H:%M:%S") @bot.say who, "repeat reminder (next at #{tstr}): #{subject}" } else @reminders[who][subject] = @bot.timer.add_once(period) { - time = Time.now + period - tstr = time.strftime("%H:%M:%S") + tstr = Time.now.strftime("%H:%M:%S") @bot.say who, "reminder (#{tstr}): #{subject}" } end |