fix internal server error for chudded ppl whose name starts with a number (like 911roofer) bc of invalid regex group reference (lol)

master
Aevann 2023-04-24 08:58:31 +02:00
parent 5b73fddc00
commit aba2820dcc
1 changed files with 3 additions and 3 deletions

View File

@ -619,9 +619,9 @@ def torture_ap(string, username):
if not string: return string if not string: return string
for k, l in AJ_REPLACEMENTS.items(): for k, l in AJ_REPLACEMENTS.items():
string = string.replace(k, l) string = string.replace(k, l)
string = torture_regex.sub(rf'\1{username}\3', string) string = torture_regex.sub(rf'\1@{username}\3', string)
string = torture_regex2.sub(rf'\1{username} is\3', string) string = torture_regex2.sub(rf'\1@{username} is\3', string)
string = torture_regex3.sub(rf"\1{username}'s\3", string) string = torture_regex3.sub(rf"\1@{username}'s\3", string)
return string return string
def complies_with_chud(obj): def complies_with_chud(obj):