From 72d8ff4782bdcf90e80be1cac92c40f0114464c8 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 2 Mar 2024 19:50:48 -0500 Subject: [PATCH] =?UTF-8?q?fix(pterodactyl):=20=F0=9F=A5=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pterodactyl/websocket.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pterodactyl/websocket.py b/pterodactyl/websocket.py index a6f6fe4..3c3daeb 100644 --- a/pterodactyl/websocket.py +++ b/pterodactyl/websocket.py @@ -47,7 +47,9 @@ 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() - if await config.current_status() in ('running', 'offline', '') and not any(re.match(regex, msg) for regex in regex_blacklist.values()): + matches = [re.match(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) if await config.mask_ip() is True: content = mask_ip(content)