Don't send empty space with JOIN if key=="" (src/IRCServer.py)

This commit is contained in:
jesopo 2019-02-10 14:59:53 +00:00
parent af3057dee0
commit b744281e3d

View file

@ -435,7 +435,7 @@ class Server(IRCObject.Object):
self.send_join(event["channel_name"], event["key"]) self.send_join(event["channel_name"], event["key"])
def send_join(self, channel_name: str, key: str=None) -> IRCLine.Line: def send_join(self, channel_name: str, key: str=None) -> IRCLine.Line:
return self.send("JOIN %s%s" % (channel_name, return self.send("JOIN %s%s" % (channel_name,
"" if key == None else " %s" % key)) "" if key else " %s" % key))
def send_part(self, channel_name: str, reason: str=None) -> IRCLine.Line: def send_part(self, channel_name: str, reason: str=None) -> IRCLine.Line:
return self.send("PART %s%s" % (channel_name, return self.send("PART %s%s" % (channel_name,
"" if reason == None else " %s" % reason)) "" if reason == None else " %s" % reason))