From 5e7b335d04e953357af087b29e3c293fee0b8ad9 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 8 Nov 2018 11:13:24 +0000 Subject: Fix issues that were introduced in message-tag parsing when I added support for JSON message tags --- src/utils/irc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/irc.py b/src/utils/irc.py index 821a46d9..a128a565 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -84,10 +84,10 @@ def parse_line(line: str) -> IRCLine: command = None if line[0] == "@": - if line[1] == "{": - tags = json.loads(line[2:]) + tags_prefix, line = line[1:].split(" ", 1) + if tags_prefix[0] == "{": + tags = json.loads(tags_prefix) else: - tags_prefix, line = line[1:].split(" ", 1) for tag in filter(None, tags_prefix.split(";")): tag, sep, value = tag.partition("=") if sep: -- cgit v1.3.1-10-gc9f91