From cd97a653cc47d4047a5eb18ff96424fcee69e3eb Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 18 Feb 2019 15:00:05 +0000 Subject: [PATCH] Don't try to use `keys` if we try to join a channel without any keys --- src/utils/irc/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/irc/protocol.py b/src/utils/irc/protocol.py index 6a1844f9..3202ec14 100644 --- a/src/utils/irc/protocol.py +++ b/src/utils/irc/protocol.py @@ -25,7 +25,7 @@ def pong(nonce: str="hello") -> 'utils.irc.IRCParsedLine': def join(channel_name: str, keys: typing.List[str] ) -> 'utils.irc.IRCParsedLine': - return utils.irc.IRCParsedLine("JOIN", [channel_name]+keys) + return utils.irc.IRCParsedLine("JOIN", [channel_name]+keys if keys else []) def part(channel_name: str, reason: str=None) -> 'utils.irc.IRCParsedLine': return utils.irc.IRCParsedLine("PART", [channel_name]+( [reason] if reason else []))