add a special flag to allow commands to bypass !silence

This commit is contained in:
jesopo 2019-09-09 18:05:10 +01:00
parent a9b106c6be
commit 695c7982a6

View file

@ -29,7 +29,8 @@ class Module(ModuleManager.BaseModule):
@utils.hook("preprocess.command", priority=EventManager.PRIORITY_HIGH) @utils.hook("preprocess.command", priority=EventManager.PRIORITY_HIGH)
def preprocess_command(self, event): def preprocess_command(self, event):
if event["is_channel"]: if event["is_channel"] and not event["hook"].get_kwarg(
"unsilence", False):
silence_until = event["target"].get_setting("silence-until", None) silence_until = event["target"].get_setting("silence-until", None)
if silence_until: if silence_until:
if self._is_silenced(event["target"]): if self._is_silenced(event["target"]):