fix(pterodactyl): use an escaped * for ip masking so markdown isn't triggered

This commit is contained in:
Seaswimmer 2024-03-01 22:39:58 -05:00
parent 306148ea69
commit f93223fd36
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -256,6 +256,6 @@ async def generate_achievement_embed(username: str, achievement: str, challenge:
def mask_ip(string: str) -> str:
def mask_ip(match):
ip = match.group(0)
masked_ip = '.'.join('*' * len(octet) for octet in ip.split('.'))
masked_ip = '.'.join(r'\*' * len(octet) for octet in ip.split('.'))
return masked_ip
return re.sub(r'\b(?:\d{1,3}\.){3}\d{1,3}\b', mask_ip, string)