From eb456f0123c73841afb772501b98f1ad5c0e5a0b Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 15 May 2019 16:39:11 +0100 Subject: [PATCH] Set silence.py's `preprocess.command` hook to PRIORITY_HIGH, so that other modules can't respond to the event with errors first --- modules/silence.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/silence.py b/modules/silence.py index 89b99bac..f90cc3c3 100644 --- a/modules/silence.py +++ b/modules/silence.py @@ -1,5 +1,5 @@ import time -from src import ModuleManager, utils +from src import EventManager, ModuleManager, utils SILENCE_TIME = 60*5 # 5 minutes @@ -23,7 +23,7 @@ class Module(ModuleManager.BaseModule): event["target"].set_setting("silence-until", silence_until) event["stdout"].write("Ok, I'll be back") - @utils.hook("preprocess.command") + @utils.hook("preprocess.command", priority=EventManager.PRIORITY_HIGH) def preprocess_command(self, event): if event["is_channel"]: silence_until = event["target"].get_setting("silence-until", None)