Fix issues that were introduced in message-tag parsing when I added support for

JSON message tags
This commit is contained in:
jesopo 2018-11-08 11:13:24 +00:00
parent 4d272a3fa4
commit 5e7b335d04

View file

@ -84,10 +84,10 @@ def parse_line(line: str) -> IRCLine:
command = None command = None
if line[0] == "@": if line[0] == "@":
if line[1] == "{": tags_prefix, line = line[1:].split(" ", 1)
tags = json.loads(line[2:]) if tags_prefix[0] == "{":
tags = json.loads(tags_prefix)
else: else:
tags_prefix, line = line[1:].split(" ", 1)
for tag in filter(None, tags_prefix.split(";")): for tag in filter(None, tags_prefix.split(";")):
tag, sep, value = tag.partition("=") tag, sep, value = tag.partition("=")
if sep: if sep: