contextualise JOIN key check, otherwise it doesn't send channel_name

This commit is contained in:
jesopo 2019-02-19 09:32:17 +00:00
parent 9f946e236d
commit 53e5a7fe7e

View file

@ -25,7 +25,8 @@ def pong(nonce: str="hello") -> 'utils.irc.IRCParsedLine':
def join(channel_name: str, keys: typing.List[str]=None def join(channel_name: str, keys: typing.List[str]=None
) -> 'utils.irc.IRCParsedLine': ) -> 'utils.irc.IRCParsedLine':
return utils.irc.IRCParsedLine("JOIN", [channel_name]+keys if keys else []) return utils.irc.IRCParsedLine("JOIN", [channel_name]+(
keys if keys else []))
def part(channel_name: str, reason: str=None) -> 'utils.irc.IRCParsedLine': def part(channel_name: str, reason: str=None) -> 'utils.irc.IRCParsedLine':
return utils.irc.IRCParsedLine("PART", [channel_name]+( return utils.irc.IRCParsedLine("PART", [channel_name]+(
[reason] if reason else [])) [reason] if reason else []))