From 7449580c5e83e290942ebe38cc157a339224e70d Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 15 Feb 2007 23:31:41 +0000 Subject: remind plugin: one-shot reminders gave a reminder time with an extra period added. Remove it, and add some minor optimizations --- data/rbot/plugins/remind.rb | 6 ++---- 1 file 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 -- cgit v1.2.3