Fix an incorrect call to event["stderr"] in karma.py

This commit is contained in:
jesopo 2018-09-09 17:34:44 +01:00
parent 59912776c1
commit 4eaf9e5aeb

View file

@ -52,10 +52,14 @@ class Module(object):
event["user"].last_karma = time.time() event["user"].last_karma = time.time()
elif verbose: elif verbose:
if target: if target:
self.events.on("send").on("stderr").call(module_name="Karma", self.events.on("send.stderr").call(
target=event["channel"], message="You cannot change your own karma") module_name="Karma", target=event["channel"],
message="You cannot change your own karma")
elif verbose: elif verbose:
event["stderr"].write("Try again in a couple of seconds") self.events.on("send.stderr").call(module_name="Karma",
target=event["channel"],
message="Try again in a couple of seconds")
def karma(self, event): def karma(self, event):
if event["args"]: if event["args"]:
target = event["args"] target = event["args"]