From 8d8d9219b8ff5ab003e80fad52dd9cb30d27d75d Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 10 Sep 2019 15:10:14 +0100 Subject: [PATCH] don't return "+" when a channel has no modes --- src/IRCChannel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/IRCChannel.py b/src/IRCChannel.py index e86eff99..01b0ad3a 100644 --- a/src/IRCChannel.py +++ b/src/IRCChannel.py @@ -73,7 +73,10 @@ class Channel(IRCObject.Object): out_modes = "".join(mode for mode, args in modes) out_args = " ".join(args[0] for mode, args in modes if args) - return "+%s%s" % (out_modes, " %s" % out_args if out_args else "") + if out_modes: + return "+%s%s" % (out_modes, " %s" % out_args if out_args else "") + else: + return "" def add_mode(self, mode: str, arg: str=None): if not mode in self.modes: