From c1e9825a3384a8bcde618b29b8f90b57a8d266cf Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 4 Nov 2018 17:23:34 +0000 Subject: Don't set `args` to a split of the data left over when parsing out a command if there's not a space after the command --- src/utils/irc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/utils/irc.py b/src/utils/irc.py index da9a0747..8aa27289 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -92,9 +92,12 @@ def parse_line(line: str) -> IRCLine: if line[0] == ":": prefix_str, line = line[1:].split(" ", 1) prefix = seperate_hostmask(prefix_str) - command, _, line = line.partition(" ") - args = line.split(" ") + args = [] + command, sep, line = line.partition(" ") + if sep: + args = line.split(" ") + if arbitrary: args.append(arbitrary) -- cgit v1.3.1-10-gc9f91