Handle \x01ACTION that's not correctly terminated with a \x01

This commit is contained in:
jesopo 2018-09-05 15:02:38 +01:00
parent 07c08ad428
commit 33286319bb

View file

@ -388,9 +388,11 @@ class LineHandler(object):
message = event["arbitrary"] or "" message = event["arbitrary"] or ""
message_split = message.split(" ") message_split = message.split(" ")
target = event["args"][0] target = event["args"][0]
action = message.startswith("\01ACTION ") and message.endswith("\01") action = message.startswith("\x01ACTION ")
if action: if action:
message = message.replace("\01ACTION ", "", 1)[:-1] message = message.replace("\x01ACTION ", "", 1)
if message.endswith("\x01"):
message = message[:-1]
kwargs = {"message": message, "message_split": message_split, kwargs = {"message": message, "message_split": message_split,
"server": event["server"], "tags": event["tags"], "server": event["server"], "tags": event["tags"],