The target channel of an /INVITE is the second argument!

This commit is contained in:
jesopo 2018-11-12 22:37:01 +00:00
parent 911ace524d
commit 439994464f

View file

@ -362,7 +362,7 @@ class Module(ModuleManager.BaseModule):
# someone (maybe me!) has been invited somewhere # someone (maybe me!) has been invited somewhere
@utils.hook("raw.invite") @utils.hook("raw.invite")
def invite(self, event): def invite(self, event):
target_channel = event["args"][0] target_channel = event["args"][1]
user = event["server"].get_user(event["prefix"].nickname) user = event["server"].get_user(event["prefix"].nickname)
target_user = event["server"].get_user(event["args"][0]) target_user = event["server"].get_user(event["args"][0])
self.events.on("received.invite").call(user=user, self.events.on("received.invite").call(user=user,