aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-05-21 16:48:10 +0100
committerGravatar jesopo2019-05-21 16:48:10 +0100
commitd5a973b84b37e445cdbf6c7dbc5035e60529fa34 (patch)
tree851ec7b0db35496174dbb4b2e1c26c6d05c70789 /modules
parenttypo, 'preix' -> 'prefix' (diff)
signature
Don't allow karma for empty strings
Diffstat (limited to 'modules')
-rw-r--r--modules/karma.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/karma.py b/modules/karma.py
index 2adbd590..1e3504b6 100644
--- a/modules/karma.py
+++ b/modules/karma.py
@@ -37,6 +37,9 @@ class Module(ModuleManager.BaseModule):
if not event["user"].last_karma or (time.time()-event["user"
].last_karma) >= KARMA_DELAY_SECONDS:
target = event["match"].group(1).strip().rstrip("".join(WORD_STOP))
+ if not target:
+ return
+
if event["server"].irc_lower(target) == event["user"].name:
if verbose:
event["stderr"].write("You cannot change your own karma")