From 58e88f2dd6a4847ea3b036f3430e876e8a4d8260 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 2 Mar 2024 20:09:39 -0500 Subject: [PATCH] fix(pterodactyl): use re.search instead of re.match (thanks zephyrkul) --- pterodactyl/websocket.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pterodactyl/websocket.py b/pterodactyl/websocket.py index 7725df2..340a451 100644 --- a/pterodactyl/websocket.py +++ b/pterodactyl/websocket.py @@ -47,9 +47,7 @@ async def establish_websocket_connection(coginstance: Pterodactyl) -> None: if json.loads(message)['event'] == 'console output' and await config.console_channel() is not None: msg = json.loads(message)['args'][0] regex_blacklist: dict = await config.regex_blacklist() - for regex in regex_blacklist.values(): - logger.debug(regex) - matches = [re.match(regex, msg) for regex in regex_blacklist.values()] + matches = [re.search(regex, msg) for regex in regex_blacklist.values()] if await config.current_status() in ('running', 'offline', '') and not any(matches): content = remove_ansi_escape_codes(msg)