forked from blizzthewolf/SeaCogs
fix(pterodactyl): fixed server messages sometimes not logging
This commit is contained in:
parent
6a02381e89
commit
e9523d5f70
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ def register_config(config_obj: Config) -> None:
|
||||||
startup_arguments=None,
|
startup_arguments=None,
|
||||||
current_status='',
|
current_status='',
|
||||||
chat_regex=r"\[(\d{2}:\d{2}:\d{2})\sINFO\]:\s<(\w+)>\s(.*)",
|
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_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]:( \[Not Secure\])? \[.*\] (.*)",
|
||||||
join_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) joined the game$",
|
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$",
|
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) \[(.*)\]$",
|
achievement_regex=r"^\[\d{2}:\d{2}:\d{2} INFO\]: (.*) has (made the advancement|completed the challenge) \[(.*)\]$",
|
||||||
|
|
|
@ -153,7 +153,7 @@ async def check_if_server_message(text: str) -> Union[bool, str]:
|
||||||
match: Optional[re.Match[str]] = re.match(regex, text)
|
match: Optional[re.Match[str]] = re.match(regex, text)
|
||||||
if match:
|
if match:
|
||||||
logger.debug("Message is a server message")
|
logger.debug("Message is a server message")
|
||||||
return match.group(1)
|
return match.group(2)
|
||||||
logger.debug("Message is not a server message")
|
logger.debug("Message is not a server message")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue