]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/remind.rb
imdb plugin: add country and director to movie info
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / remind.rb
index ca695a499f0bd35d3ec3386a4af3438c60ef4c35..6ce179c49a8694371f30bf1e28e322748da07de0 100644 (file)
@@ -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).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