ignore users ignored from !factoid for automatic factoid parsing

This commit is contained in:
jesopo 2019-05-09 13:48:45 +01:00
parent 9bdd28ce60
commit 4986c52d9b

View file

@ -30,6 +30,11 @@ class Module(ModuleManager.BaseModule):
def channel_message(self, event): def channel_message(self, event):
match = REGEX_FACTOID.search(event["message"]) match = REGEX_FACTOID.search(event["message"])
if match: 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)) name, value = self._get_factoid(event["server"], match.group(1))
if not value == None: if not value == None:
self.events.on("send.stdout").call(target=event["channel"], self.events.on("send.stdout").call(target=event["channel"],