aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-04 17:23:34 +0000
committerGravatar jesopo2018-11-04 17:23:34 +0000
commitc1e9825a3384a8bcde618b29b8f90b57a8d266cf (patch)
treeb9b369ab24b63ffeaf751a54a8b0938e99531af4 /src/utils
parentImplement utils.irc.IRCArgs.__len__ (diff)
signature
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
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/irc.py7
1 files changed, 5 insertions, 2 deletions
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)