From 4986c52d9b4588517575e52865e28854c437f912 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 9 May 2019 13:48:45 +0100 Subject: [PATCH] ignore users ignored from !factoid for automatic factoid parsing --- modules/factoids.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/factoids.py b/modules/factoids.py index 99680fed..38ca0901 100644 --- a/modules/factoids.py +++ b/modules/factoids.py @@ -30,6 +30,11 @@ class Module(ModuleManager.BaseModule): def channel_message(self, event): match = REGEX_FACTOID.search(event["message"]) if match: + is_ignored_f = short_url = self.exports.get_one("is-ignored", + lambda _1, _2: False) + if is_ignored_f(event["server"], event["user"], "factoid"): + return + name, value = self._get_factoid(event["server"], match.group(1)) if not value == None: self.events.on("send.stdout").call(target=event["channel"],