send.stdout/send.stderr need a server kwarg

This commit is contained in:
jesopo 2018-10-04 14:44:33 +01:00
parent 6a0dfdc663
commit 1c20eab9d6
2 changed files with 6 additions and 4 deletions

View file

@ -34,5 +34,5 @@ class Module(ModuleManager.BaseModule):
self.events.on("send.stdout").call( self.events.on("send.stdout").call(
module_name="CheckURL", target=event["channel"], module_name="CheckURL", target=event["channel"],
message="%s just send a malicous URL!" % message="%s just send a malicous URL!" %
event["user"].nickname) event["user"].nickname, server=event["server"])

View file

@ -32,7 +32,8 @@ class Module(ModuleManager.BaseModule):
if verbose: if verbose:
self.events.on("send.stderr").call( self.events.on("send.stderr").call(
module_name="Karma", target=event["channel"], module_name="Karma", target=event["channel"],
message="You cannot change your own karma") message="You cannot change your own karma",
server=event["server"])
return return
setting = "karma-%s" % target setting = "karma-%s" % target
@ -56,11 +57,12 @@ class Module(ModuleManager.BaseModule):
if verbose: if verbose:
self.events.on("send.stdout").call( self.events.on("send.stdout").call(
module_name="Karma", target=event["channel"], module_name="Karma", target=event["channel"],
message="%s now has %d karma" % (target, karma)) message="%s now has %d karma" % (target, karma),
server=event["server"])
event["user"].last_karma = time.time() event["user"].last_karma = time.time()
elif verbose: elif verbose:
self.events.on("send.stderr").call(module_name="Karma", self.events.on("send.stderr").call(module_name="Karma",
target=event["channel"], target=event["channel"], server=event["server"],
message="Try again in a couple of seconds") message="Try again in a couple of seconds")
@utils.hook("received.command.karma") @utils.hook("received.command.karma")