From 540c7b8c44b4af13ffd1fe97a50a0b8746f96b78 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 12 Sep 2019 11:23:29 +0100 Subject: [PATCH] Revert "INVITE should be [channel_name, target]" This reverts commit f3d8ffad2c8dc9444e32f65e3c78373ec6ad0661. --- src/IRCServer.py | 4 ++-- src/utils/irc/protocol.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/IRCServer.py b/src/IRCServer.py index 752e2f67..ace64b0f 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -378,9 +378,9 @@ class Server(IRCObject.Object): def send_list(self, search_for: str=None ) -> typing.Optional[IRCLine.SentLine]: return self.send(utils.irc.protocol.list(search_for)) - def send_invite(self, channel_name: str, target: str + def send_invite(self, target: str, channel_name: str ) -> typing.Optional[IRCLine.SentLine]: - return self.send(utils.irc.protocol.invite(channel_name, target)) + return self.send(utils.irc.protocol.invite(target, channel_name)) def send_whois(self, target: str) -> typing.Optional[IRCLine.SentLine]: return self.send(utils.irc.protocol.whois(target)) diff --git a/src/utils/irc/protocol.py b/src/utils/irc/protocol.py index 06a4d15d..66b4028c 100644 --- a/src/utils/irc/protocol.py +++ b/src/utils/irc/protocol.py @@ -61,8 +61,8 @@ def names(channel_name: str) -> IRCLine.ParsedLine: return IRCLine.ParsedLine("NAMES", [channel_name]) def list(search_for: str=None) -> IRCLine.ParsedLine: return IRCLine.ParsedLine("LIST", [search_for] if search_for else []) -def invite(channel_name: str, target: str) -> IRCLine.ParsedLine: - return IRCLine.ParsedLine("INVITE", [channel_name, target]) +def invite(target: str, channel_name: str) -> IRCLine.ParsedLine: + return IRCLine.ParsedLine("INVITE", [target, channel_name]) def whois(target: str) -> IRCLine.ParsedLine: return IRCLine.ParsedLine("WHOIS", [target])