Handle IRCArgs being empty strings (e.g. 'PRIVMSG #test :')

This commit is contained in:
jesopo 2019-03-08 23:23:09 +00:00
parent 5165e53264
commit f1348e5679

View file

@ -68,7 +68,8 @@ class ParsedLine(object):
if self.args: if self.args:
for i, arg in enumerate(self._args): for i, arg in enumerate(self._args):
if i == len(self._args)-1 and (" " in arg or arg[0] == ":"): if arg and i == len(self._args)-1 and (
" " in arg or arg[0] == ":"):
pieces.append(":%s" % arg) pieces.append(":%s" % arg)
else: else:
pieces.append(arg) pieces.append(arg)