From a9b0dd331b750ad174b7cb7046ea27db055d7ce0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 2 Oct 2018 15:14:34 +0100 Subject: [PATCH] Correctly set nickname-only karma --- modules/karma.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/karma.py b/modules/karma.py index 46ab0379..fcef457e 100644 --- a/modules/karma.py +++ b/modules/karma.py @@ -39,19 +39,19 @@ class Module(ModuleManager.BaseModule): setting_target = event["server"] if nickname_only: user = event["server"].get_user(target) - setting = target + setting = "karma" setting_target = user if not event["channel"].has_user(user): return positive = match.group(2)[0] == "+" - karma = event["server"].get_setting(setting, 0) + karma = setting_target.get_setting(setting, 0) karma += 1 if positive else -1 if karma: - event["server"].set_setting(setting, karma) + setting_target.set_setting(setting, karma) else: - event["server"].del_setting(setting) + setting_target.del_setting(setting) if verbose: self.events.on("send.stdout").call(