aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2019-02-20 14:46:40 +0000
committerGravatar jesopo2019-02-20 14:46:40 +0000
commit81d82413d4924bd376c9b61a752f248fece0b02a (patch)
tree39176b56aacb76ac2205dcf31b5c3967cbfddae0 /src/utils
parentPass `key` through to _get_settings (rest_api.py) (diff)
signature
draft/message-tags-0.3 (JSON tags) was rejected
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/irc/__init__.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/utils/irc/__init__.py b/src/utils/irc/__init__.py
index 9c19f911..610a6bb3 100644
--- a/src/utils/irc/__init__.py
+++ b/src/utils/irc/__init__.py
@@ -116,16 +116,12 @@ def parse_line(line: str) -> IRCParsedLine:
if line[0] == "@":
tags_prefix, line = line[1:].split(" ", 1)
- if tags_prefix[0] == "{":
- tags_prefix = message_tag_unescape(tags_prefix)
- tags = json.loads(tags_prefix)
- else:
- for tag in filter(None, tags_prefix.split(";")):
- tag, sep, value = tag.partition("=")
- if sep:
- tags[tag] = message_tag_unescape(value)
- else:
- tags[tag] = None
+ for tag in filter(None, tags_prefix.split(";")):
+ tag, sep, value = tag.partition("=")
+ if sep:
+ tags[tag] = message_tag_unescape(value)
+ else:
+ tags[tag] = None
line, trailing_separator, trailing_split = line.partition(" :")