From 4c234502f7a5c976d3fe315c0616ba201b861888 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 2 Mar 2024 12:40:25 -0500 Subject: [PATCH] fix(pterodactyl): fixed broken regex --- .docs/pterodactyl/configuration.md | 2 +- pterodactyl/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.docs/pterodactyl/configuration.md b/.docs/pterodactyl/configuration.md index 5bcac12..f148869 100644 --- a/.docs/pterodactyl/configuration.md +++ b/.docs/pterodactyl/configuration.md @@ -145,7 +145,7 @@ This regex pattern is used to detect whenever a server message is sent. You will Default value: ```re -^\[\d{2}:\d{2}:\d{2} INFO\]:( \[Not Secure\])? \[?:(Server|Rcon)\] (.*) +^\[\d{2}:\d{2}:\d{2} INFO\]:(?: \[Not Secure\])? \[(?:Server|Rcon)\] (.*) ``` ## `serverid` diff --git a/pterodactyl/config.py b/pterodactyl/config.py index accbc3b..79b96a4 100644 --- a/pterodactyl/config.py +++ b/pterodactyl/config.py @@ -11,7 +11,7 @@ def register_config(config_obj: Config) -> None: startup_arguments=None, current_status='', chat_regex=r"\[(\d{2}:\d{2}:\d{2})\sINFO\]:\s<(\w+)>\s(.*)", - server_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]:( \[Not Secure\])? \[?:(Server|Rcon)\] (.*)", + 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$", achievement_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: (.*) has (made the advancement|completed the challenge) \[(.*)\]$",