aboutsummaryrefslogtreecommitdiff
path: root/src/IRCChannel.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-10 15:10:14 +0100
committerGravatar jesopo2019-09-10 15:10:14 +0100
commit8d8d9219b8ff5ab003e80fad52dd9cb30d27d75d (patch)
treec2352a33c4f1fa4a959a98e72a951dcb1039195e /src/IRCChannel.py
parentdon't bother sorting json keys when the json is minified (diff)
signature
don't return "+" when a channel has no modes
Diffstat (limited to 'src/IRCChannel.py')
-rw-r--r--src/IRCChannel.py5
1 files changed, 4 insertions, 1 deletions
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: