diff options
| author | 2019-06-11 13:17:50 +0100 | |
|---|---|---|
| committer | 2019-06-11 13:17:50 +0100 | |
| commit | db7c62f76ad713f543c99f277272b38b09769566 (patch) | |
| tree | fb7219836f9eb77c37ee07ef0a97bc9d0cfa6c19 /modules | |
| parent | Make root wikipedia command !wikipedia, !wi and !wiki as aliases (diff) | |
Drastically simplify karma regex: only "strip" off last 2 chars of --/++
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/karma.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/karma.py b/modules/karma.py index 6dc4412d..78eebe02 100644 --- a/modules/karma.py +++ b/modules/karma.py @@ -5,7 +5,6 @@ import re, time from src import EventManager, ModuleManager, utils -REGEX_KARMA = re.compile("^(.*[^-+])[-+]*(\+{2,}|\-{2,})$") WORD_STOP = [",", ":"] KARMA_DELAY_SECONDS = 3 @@ -32,7 +31,7 @@ class Module(ModuleManager.BaseModule): def channel_message(self, event): """ :command: karma - :pattern: ^(.*[^-+])[-+]*(\+{2,}|\-{2,})$ + :pattern: ^(.*)(\+{2}|\-{2})$ """ verbose = event["target"].get_setting("karma-verbose", False) nickname_only = event["server"].get_setting("karma-nickname-only", |
