diff --git a/hugvey/story.py b/hugvey/story.py index aee72be..e84d50e 100644 --- a/hugvey/story.py +++ b/hugvey/story.py @@ -403,7 +403,7 @@ class Condition(object): if not story.lastMsgFinishTime: return False - loopTime = story.hugvey.command.timer.getElapsed() + loopTime = story.hugvey.command.timer.getElapsed() % 3600 givenTime = int(self.vars['time']) if 'inverseMatch' in self.vars and self.vars['inverseMatch']: @@ -950,7 +950,8 @@ class Diversion(object): window_open_second = float(self.params['start_second']) window_close_second = window_open_second + float(self.params['window']) - now = story.hugvey.command.timer.getElapsed() + # Only keep a 1h loop + now = story.hugvey.command.timer.getElapsed() % 3600 if now < window_open_second or now > window_close_second: return