diff options
-rw-r--r-- | data/rbot/plugins/time.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/rbot/plugins/time.rb b/data/rbot/plugins/time.rb index 854e403d..efea466f 100644 --- a/data/rbot/plugins/time.rb +++ b/data/rbot/plugins/time.rb @@ -159,8 +159,12 @@ class TimePlugin < Plugin offset = (time - now).abs raise if offset < 0.1 rescue => e - m.reply _("unintelligible time") - return + if str.match(/^\d+$/) + time = Time.at(str.to_i) + else + m.reply _("unintelligible time") + return + end end if zone = @registry[m.sourcenick] |