forked from rDrama/rDrama
1
0
Fork 0

fix 500 and add r*pe to the bad words filter

master
justcool393 2022-11-03 18:03:30 -05:00
parent 5f8a27636e
commit 731c0cc83c
2 changed files with 2 additions and 1 deletions

View File

@ -130,6 +130,7 @@ PROFANITIES = {
'cum': ['c*m'],
'orgasm': ['sexual climax'],
'toilet': ['potty'],
'rape': ['r*pe'],
}
if SITE_NAME == 'rDrama':

View File

@ -119,7 +119,7 @@ def sub_matcher(match, upper=False, replace_with:Union[dict[str, str], dict[str,
if match.group(0).startswith('<'):
return match.group(0)
else:
repl = replace_with[match.group(0).lower()]
repl = replace_with[match.group(1).lower()]
if not isinstance(repl, str):
repl = random.choice(repl)
return repl if not upper or "<img" in repl else repl.upper()