diff --git a/plugins/Time/plugin.py b/plugins/Time/plugin.py index 81037d95f..ca4f41faa 100644 --- a/plugins/Time/plugin.py +++ b/plugins/Time/plugin.py @@ -112,7 +112,7 @@ class Time(callbacks.Plugin): if new != now: if new - now < 0: new += 86400 - irc.reply(new-now) + irc.reply(str(new-now)) else: irc.error('That\'s right now!') until = wrap(until, ['text']) diff --git a/plugins/Time/test.py b/plugins/Time/test.py index 0977eae8a..3078e8bab 100644 --- a/plugins/Time/test.py +++ b/plugins/Time/test.py @@ -51,6 +51,11 @@ class TimeTestCase(PluginTestCase): self.assertNotError('ctime') self.assertNotError('time %Y') + def testNoNestedErrors(self): + self.assertNotError('echo [until 4:00]') + self.assertNotError('echo [at now]') + self.assertNotError('echo [seconds 4m]') + # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: