class RemindPlugin < Plugin # read a time in string format, turn it into "seconds from now". # example formats handled are "5 minutes", "2 days", "five hours", # "11:30", "15:45:11", "one day", etc. # # Throws:: RunTimeError "invalid time string" on parse failure def timestr_offset(timestr) Utils.parse_time_offset(timestr) end class UnparsedPeriodError < RuntimeError ; end class NegativePeriodError < RuntimeError ; end class ShortRepeatError < RuntimeError ; end def initialize super @reminders = Hash.new end def cleanup @reminders.each_value {|v| v.each_value {|vv| @bot.timer.remove(vv) } } @reminders.clear super end def help(plugin, topic="") "reminder plugin: remind [about] in