diff options
| author | 2019-09-10 15:10:14 +0100 | |
|---|---|---|
| committer | 2019-09-10 15:10:14 +0100 | |
| commit | 8d8d9219b8ff5ab003e80fad52dd9cb30d27d75d (patch) | |
| tree | c2352a33c4f1fa4a959a98e72a951dcb1039195e /src/IRCChannel.py | |
| parent | don'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.py | 5 |
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: |
