diff options
| author | 2019-05-15 16:39:11 +0100 | |
|---|---|---|
| committer | 2019-05-15 16:39:11 +0100 | |
| commit | eb456f0123c73841afb772501b98f1ad5c0e5a0b (patch) | |
| tree | f531df0e748654664517e34622f8ebaa7c8042cb | |
| parent | Import IRCBot in metadata.py (diff) | |
Set silence.py's `preprocess.command` hook to PRIORITY_HIGH, so that other
modules can't respond to the event with errors first
| -rw-r--r-- | modules/silence.py | 4 |
1 files 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) |
