Skip to content

Commit 6fcb302

Browse files
committed
Fix creating commands with empty parameters
1 parent 3eecd36 commit 6fcb302

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

irclib/parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ def __str__(self):
429429
if not self:
430430
return ''
431431

432-
if self.has_trail or PARAM_SEP in self[-1]:
432+
needs_trail = PARAM_SEP in self[-1] or self[-1].startswith(TRAIL_SENTINEL) or not self[-1]
433+
434+
if self.has_trail or needs_trail:
433435
return PARAM_SEP.join(self[:-1] + [TRAIL_SENTINEL + self[-1]])
434436

435437
return PARAM_SEP.join(self)

0 commit comments

Comments
 (0)