From 464483b4c978070f50752163472f6ea0ca1d5ac3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 2 Mar 2024 15:30:47 -0500 Subject: [PATCH] fix(pterodactyl): regex consistency --- .docs/pterodactyl/regex.md | 2 +- pterodactyl/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.docs/pterodactyl/regex.md b/.docs/pterodactyl/regex.md index 76f0841..49c977e 100644 --- a/.docs/pterodactyl/regex.md +++ b/.docs/pterodactyl/regex.md @@ -11,7 +11,7 @@ ### Chat ```re -\[\d{2}:\d{2}:\d{2}\sINFO\]: (?!\[(?:Server|Rcon)\])(?:<|\[)(\w+)(?:>|\]) (.*) +^\[\d{2}:\d{2}:\d{2}\sINFO\]: (?!\[(?:Server|Rcon)\])(?:<|\[)(\w+)(?:>|\]) (.*) ``` ### Join diff --git a/pterodactyl/config.py b/pterodactyl/config.py index 8d93a42..10f6fb5 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\]: (?!\[(?:Server|Rcon)\])(?:<|\[)(\w+)(?:>|\]) (.*)", + chat_regex=r"^\[\d{2}:\d{2}:\d{2}\sINFO\]: (?!\[(?:Server|Rcon)\])(?:<|\[)(\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$",