aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-08 11:52:53 +0000
committerGravatar jesopo2018-11-08 11:52:53 +0000
commit03cae696c178f7a858ba723e4cdb9d596356c18b (patch)
tree6b2d0ee80e725396d78da7681e02f450162f4509 /src/utils
parentOnly mesage-tag unescape non-json tags after we split on ";" (diff)
signature
Technically, we only need to unescape non-json message-tag *values*
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/irc.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/utils/irc.py b/src/utils/irc.py
index 01c382a2..f4a1f1b2 100644
--- a/src/utils/irc.py
+++ b/src/utils/irc.py
@@ -97,12 +97,10 @@ def parse_line(line: str) -> IRCLine:
tags_prefix = message_tag_unescape(tags_prefix)
tags = json.loads(tags_prefix)
else:
- tags_split = list(filter(None, tags_prefix.split(";")))
- tags_split = [message_tag_unescape(tag) for tag in tags_split]
- for tag in tags_split:
+ for tag in filter(None, tags_prefix.split(";")):
tag, sep, value = tag.partition("=")
if sep:
- tags[tag] = value
+ tags[tag] = message_tag_unescape(value)
else:
tags[tag] = None