From cb86d6628789789942198cb4c734895103830fdb Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 31 Jan 2016 00:54:54 -0600 Subject: [PATCH] Add a per-channel quiet config setting. --- CHANGELOG | 1 + earwigbot/managers.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 110536a..25f3b5b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ v0.3 (unreleased): Improved time detection and argument parsing. Newly expired reminders are now triggered on bot startup. - IRC > !stalk: Allow regular expressions as page titles or usernames. +- IRC: Added a per-channel quiet config setting. - IRC: Try not to join channels before NickServ auth has completed. - IRC: Improved detection of maximum IRC message length. - IRC: Improved some help commands. diff --git a/earwigbot/managers.py b/earwigbot/managers.py index dbd0bf2..9c51adf 100644 --- a/earwigbot/managers.py +++ b/earwigbot/managers.py @@ -225,6 +225,8 @@ class CommandManager(_ResourceManager): .. note:: The special ``rc`` hook actually passes a :class:`~.RC` object. """ + if data.chan in self.bot.config.irc.get("quiet", []): + return for command in self: if hook in command.hooks and self._wrap_check(command, data): thread = Thread(target=self._wrap_process,