forked from blizzthewolf/SeaCogs
fix(pterodactyl): use re.search instead of re.match (thanks zephyrkul)
This commit is contained in:
parent
9106675276
commit
58e88f2dd6
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue