Strip "," and ":" from karma targets (karma.py)
This commit is contained in:
parent
3c6827850a
commit
f86a852d55
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import re, time
|
|||
from src import EventManager, ModuleManager, utils
|
||||
|
||||
REGEX_KARMA = re.compile("^(.*[^-+])[-+]*(\+{2,}|\-{2,})$")
|
||||
WORD_STOP = [",", ":"]
|
||||
KARMA_DELAY_SECONDS = 3
|
||||
|
||||
@utils.export("channelset", {"setting": "karma-verbose",
|
||||
|
@ -35,7 +36,7 @@ class Module(ModuleManager.BaseModule):
|
|||
|
||||
if not event["user"].last_karma or (time.time()-event["user"
|
||||
].last_karma) >= KARMA_DELAY_SECONDS:
|
||||
target = match.group(1).strip()
|
||||
target = match.group(1).strip().strip("".join(WORD_STOP))
|
||||
if event["server"].irc_lower(target) == event["user"].name:
|
||||
if verbose:
|
||||
self.events.on("send.stderr").call(
|
||||
|
|
Loading…
Reference in a new issue