From a5f8bb7d3df87e819384137e40052fe86a8ad2bc Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 27 Apr 2019 14:51:26 +0100 Subject: [PATCH] Use is-ignored export in karma to allow ignoring users for karma --- modules/karma.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/karma.py b/modules/karma.py index ef694277..1028ed2d 100644 --- a/modules/karma.py +++ b/modules/karma.py @@ -29,6 +29,11 @@ class Module(ModuleManager.BaseModule): def channel_message(self, event): match = re.match(REGEX_KARMA, event["message"].strip()) if match and not event["action"]: + is_ignored_f = short_url = self.exports.get_one("is-ignored", + lambda _1, _2: False) + if is_ignored_f(event["user"], "karma"): + return + verbose = event["channel"].get_setting("karma-verbose", False) nickname_only = event["server"].get_setting("karma-nickname-only", False)