fix(pterodactyl): 🥺
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 21s
Actions / Build Documentation (MkDocs) (push) Successful in 26s

This commit is contained in:
Seaswimmer 2024-03-02 19:50:48 -05:00
parent 9e92d82817
commit 72d8ff4782
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -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: if json.loads(message)['event'] == 'console output' and await config.console_channel() is not None:
msg = json.loads(message)['args'][0] msg = json.loads(message)['args'][0]
regex_blacklist: dict = await config.regex_blacklist() 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) content = remove_ansi_escape_codes(msg)
if await config.mask_ip() is True: if await config.mask_ip() is True:
content = mask_ip(content) content = mask_ip(content)