From 3c00d8257910022d4f791e7edb6fb675cbbbe454 Mon Sep 17 00:00:00 2001 From: Daniel Folkinshteyn Date: Sat, 4 Sep 2010 01:25:57 -0400 Subject: [PATCH] Scheduler: don't immediately execute commands when restoring repeated events. --- plugins/Scheduler/plugin.py | 6 +++--- src/version.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Scheduler/plugin.py b/plugins/Scheduler/plugin.py index 4a4611ad5..d6e4dc838 100644 --- a/plugins/Scheduler/plugin.py +++ b/plugins/Scheduler/plugin.py @@ -78,7 +78,7 @@ class Scheduler(callbacks.Plugin): event['time'], event['command'], n) elif event['type'] == 'repeat': # repeating event self._repeat(ircobj, event['msg'], name, - event['time'], event['command']) + event['time'], event['command'], False) except AssertionError, e: if str(e) == 'An event with the same name has already been scheduled.': # we must be reloading the plugin, event is still scheduled @@ -160,9 +160,9 @@ class Scheduler(callbacks.Plugin): irc.error('Invalid event id.') remove = wrap(remove, ['lowered']) - def _repeat(self, irc, msg, name, seconds, command): + def _repeat(self, irc, msg, name, seconds, command, now=True): f = self._makeCommandFunction(irc, msg, command, remove=False) - id = schedule.addPeriodicEvent(f, seconds, name) + id = schedule.addPeriodicEvent(f, seconds, name, now) assert id == name self.events[name] = {'command':command, 'msg':msg, diff --git a/src/version.py b/src/version.py index efc4da14a..d5892c844 100644 --- a/src/version.py +++ b/src/version.py @@ -1,3 +1,3 @@ """stick the various versioning attributes in here, so we only have to change them once.""" -version = '0.83.4.1+gribble (2010-09-02T18:31:42-0400)' +version = '0.83.4.1+gribble (2010-09-04T01:25:57-0400)'