Don't try to use keys if we try to join a channel without any keys

This commit is contained in:
jesopo 2019-02-18 15:00:05 +00:00
parent 186b6b82a2
commit cd97a653cc

View file

@ -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 []))