From 1263f59ceee4783421cc55aa59c6298244efb56f Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 2 Mar 2024 15:18:32 -0500 Subject: [PATCH] fix(pterodactyl): detect messages sent through /say --- .docs/pterodactyl/regex.md | 4 ++-- pterodactyl/config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.docs/pterodactyl/regex.md b/.docs/pterodactyl/regex.md index 41cdded..83becd2 100644 --- a/.docs/pterodactyl/regex.md +++ b/.docs/pterodactyl/regex.md @@ -11,7 +11,7 @@ ### Chat ```re -\[\d{2}:\d{2}:\d{2}\sINFO\]: <(\w+)>\s(.*) +\[\d{2}:\d{2}:\d{2}\sINFO\]: (?:<|\[)(\w+)(?:>|\]) (.*) ``` ### Join @@ -43,7 +43,7 @@ ### Chat ```re -^\[\d{2}:\d{2}:\d{2}\] \[Server thread\/INFO\] \[minecraft\/MinecraftServer\]: <(\w+)>\s(.*) +^\[\d{2}:\d{2}:\d{2}\] \[Server thread\/INFO\] \[minecraft\/MinecraftServer\]: (?:<|\[)(\w+)(?:>|\]) (.*) ``` ### Join diff --git a/pterodactyl/config.py b/pterodactyl/config.py index 5a72a9b..df0a263 100644 --- a/pterodactyl/config.py +++ b/pterodactyl/config.py @@ -10,7 +10,7 @@ def register_config(config_obj: Config) -> None: startup_jar=None, startup_arguments=None, current_status='', - chat_regex=r"\[\d{2}:\d{2}:\d{2}\sINFO\]: <(\w+)>\s(.*)", + chat_regex=r"\[\d{2}:\d{2}:\d{2}\sINFO\]: (?:<|\[)(\w+)(?:>|\]) (.*)", server_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]:(?: \[Not Secure\])? \[(?:Server|Rcon)\] (.*)", join_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) joined the game$", leave_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) left the game$",