Match " :" for arbitrary instead of ":", to avoid e.g. splitting ipv6 in to
pieces!
This commit is contained in:
parent
83c0022c4d
commit
89f928327b
1 changed files with 8 additions and 7 deletions
|
@ -63,18 +63,19 @@ class LineHandler(object):
|
||||||
tag_split = tag.split("=", 1)
|
tag_split = tag.split("=", 1)
|
||||||
tags[tag_split[0]] = "".join(tag_split[1:])
|
tags[tag_split[0]] = "".join(tag_split[1:])
|
||||||
|
|
||||||
|
arbitrary = None
|
||||||
|
if " :" in line:
|
||||||
|
line, arbitrary = line.split(" :", 1)
|
||||||
|
if line.endswith(" "):
|
||||||
|
line = line[:-1]
|
||||||
if line[0] == ":":
|
if line[0] == ":":
|
||||||
prefix, command = line[1:].split(" ", 1)
|
prefix, command = line[1:].split(" ", 1)
|
||||||
if " " in command:
|
if " " in command:
|
||||||
command, line = command.split(" ", 1)
|
command, line = command.split(" ", 1)
|
||||||
else:
|
else:
|
||||||
command, line = line.split(" ", 1)
|
command = line
|
||||||
|
if " " in line:
|
||||||
arbitrary = None
|
command, line = line.split(" ", 1)
|
||||||
if ":" in line:
|
|
||||||
line, arbitrary = line.split(":", 1)
|
|
||||||
if line.endswith(" "):
|
|
||||||
line = line[:-1]
|
|
||||||
args = line.split(" ")
|
args = line.split(" ")
|
||||||
|
|
||||||
hooks = self.events.on("raw").on(command).get_hooks()
|
hooks = self.events.on("raw").on(command).get_hooks()
|
||||||
|
|
Loading…
Reference in a new issue