From 54218b747fab2746f94120042d3166825b0f7237 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sat, 23 Feb 2019 16:07:20 +0000 Subject: [PATCH] Only allow the last arg of a formatted line to be :trailing --- src/utils/irc/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/irc/__init__.py b/src/utils/irc/__init__.py index c14364a7..10924c0d 100644 --- a/src/utils/irc/__init__.py +++ b/src/utils/irc/__init__.py @@ -96,8 +96,9 @@ class IRCParsedLine(object): s += self.command if self.args: - for i, arg in enumerate(self._args): - s += " %s" % trailing(arg) + if len(self._args) > 1: + s += " %s" % " ".join(self._args[:-1]) + s += " %s" % trailing(self._args[-1]) return s