From e69cce99257c9db466579720cce4535ba527bd30 Mon Sep 17 00:00:00 2001 From: luyijun Date: Sun, 2 Aug 2020 10:48:47 +0800 Subject: [PATCH] Fix a bug that script whose db_interval is 0 will be run when call its start method twice. --- evennia/scripts/scripts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evennia/scripts/scripts.py b/evennia/scripts/scripts.py index 2f5f95852b..7a95a80b43 100644 --- a/evennia/scripts/scripts.py +++ b/evennia/scripts/scripts.py @@ -437,7 +437,7 @@ class DefaultScript(ScriptBase): if self.is_active and not force_restart: # The script is already running, but make sure we have a _task if # this is after a cache flush - if not self.ndb._task and self.db_interval >= 0: + if not self.ndb._task and self.db_interval > 0: self.ndb._task = ExtendedLoopingCall(self._step_task) try: start_delay, callcount = SCRIPT_FLUSH_TIMERS[self.id]