Drastically simplify karma regex: only "strip" off last 2 chars of --/++
This commit is contained in:
parent
4dc957afe6
commit
db7c62f76a
1 changed files with 1 additions and 2 deletions
|
@ -5,7 +5,6 @@
|
||||||
import re, time
|
import re, time
|
||||||
from src import EventManager, ModuleManager, utils
|
from src import EventManager, ModuleManager, utils
|
||||||
|
|
||||||
REGEX_KARMA = re.compile("^(.*[^-+])[-+]*(\+{2,}|\-{2,})$")
|
|
||||||
WORD_STOP = [",", ":"]
|
WORD_STOP = [",", ":"]
|
||||||
KARMA_DELAY_SECONDS = 3
|
KARMA_DELAY_SECONDS = 3
|
||||||
|
|
||||||
|
@ -32,7 +31,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
def channel_message(self, event):
|
def channel_message(self, event):
|
||||||
"""
|
"""
|
||||||
:command: karma
|
:command: karma
|
||||||
:pattern: ^(.*[^-+])[-+]*(\+{2,}|\-{2,})$
|
:pattern: ^(.*)(\+{2}|\-{2})$
|
||||||
"""
|
"""
|
||||||
verbose = event["target"].get_setting("karma-verbose", False)
|
verbose = event["target"].get_setting("karma-verbose", False)
|
||||||
nickname_only = event["server"].get_setting("karma-nickname-only",
|
nickname_only = event["server"].get_setting("karma-nickname-only",
|
||||||
|
|
Loading…
Reference in a new issue