Handle \x01ACTION that's not correctly terminated with a \x01
This commit is contained in:
parent
07c08ad428
commit
33286319bb
1 changed files with 4 additions and 2 deletions
|
@ -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"],
|
||||||
|
|
Loading…
Reference in a new issue