diff options
| author | 2018-09-05 15:02:38 +0100 | |
|---|---|---|
| committer | 2018-09-05 15:02:38 +0100 | |
| commit | 33286319bb52f7ce4684ec9741d65a553a8701b2 (patch) | |
| tree | 2fbaa5f8de174477df9ff1d8c43c90938596421e /IRCLineHandler.py | |
| parent | Typo in channel_save; channes -> channels (diff) | |
Handle \x01ACTION that's not correctly terminated with a \x01
Diffstat (limited to 'IRCLineHandler.py')
| -rw-r--r-- | IRCLineHandler.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/IRCLineHandler.py b/IRCLineHandler.py index d3bd65a3..b4b5dd11 100644 --- a/IRCLineHandler.py +++ b/IRCLineHandler.py @@ -388,9 +388,11 @@ class LineHandler(object): message = event["arbitrary"] or "" message_split = message.split(" ") target = event["args"][0] - action = message.startswith("\01ACTION ") and message.endswith("\01") + action = message.startswith("\x01ACTION ") 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, "server": event["server"], "tags": event["tags"], |
