make profanity filter actually usable

master
Aevann1 2022-11-07 07:35:18 +02:00
parent 1a30d6ccad
commit a66add3897
2 changed files with 18 additions and 34 deletions

View File

@ -107,40 +107,26 @@ SLURS = {
PROFANITIES = {
'motherfucker': 'motherlover',
'fucking': ['fricking', 'fudging', 'freaking', 'f-wording', 'f-bombing', 'cussing'],
'fucked': ['fricked', 'fudged', 'freaked', 'f-worded', 'f-bombed', 'cussed'],
'fucker': ['fricker', 'fudger', 'freaker', 'f-worder', 'f-bomber', 'cusser'],
'fuck': ['frick', 'fudge', 'freak', 'f-word', 'f-bomb', 'cuss'],
' asshole': [' butthole ', ' ahole '],
' arsehole': [' butthole ', ' ahole '],
' ass ': [' butt ', ' backside ', ' rear end ', ' bum ', ' tochus '],
' ass ': [' butt ', ' backside ', ' rear end ', ' bum ', ' touchs '],
' arse ': [' butt ', ' backside ', ' rear end ', ' bum ', ' tochus '],
' arse ': [' butt ', ' backside ', ' rear end ', ' bum ', ' touchs '],
'shitting': ['pooping', 'crapping'],
'shitted': ['pooped', 'crapped', 'puckeyed'],
'shit': ['poop', 'crap', 'puckey'],
'fuck': 'frick',
'shitting': 'pooping',
'lmao': 'lmbo',
'damn': ['dang', 'darn'],
'bastard': ['fatherless child'],
' piss': ' pee',
'bitch': ['b-word', 'mean lady'],
'dick': 'weiner',
'cock': 'weiner',
'penis': 'peepee',
'pussy': 'girl weiner',
'vagina': 'girl peepee',
'cunt': 'rude lady',
' hell ': [' heck ', ' h-e-double-hockey-sticks '],
' sex ': ' intercourse ',
' sexual intercourse ': ' sexual congress ',
' god ': ' gosh ',
' wanker ': ' rude masturbator ',
' twat ': ' girl weiner ',
' cum ': ' c*m ',
' orgasm ': ' sexual climax ',
'damn': 'darn',
'bastard': 'fatherless child',
'bitch': 'b-word',
'toilet': 'potty',
' asshole': ' butthole',
' rape ': ' r*pe ',
' hell ': ' heck ',
' sex ': ' intercourse ',
' god ': ' gosh ',
' cum ': ' c*m ',
'orgasm': 'sexual climax',
'dick': 'peepee',
'cock': 'peepee',
'penis': 'peepee',
'pussy': 'girl peepee',
'vagina': 'girl peepee',
' twat': ' girl peepee',
}
if SITE_NAME == 'rDrama':
@ -174,7 +160,7 @@ if SITE_NAME == 'rDrama':
" pedo ": " libertarian ",
" kys": " keep yourself safe",
"kys ": "keep yourself safe ",
"republican": ['republiKKKan', 'republicunt', 'rethuglican'],
"republican": 'republiKKKan',
}
SLURS.update(RDRAMA_SLURS)

View File

@ -123,8 +123,6 @@ def sub_matcher(match:re.Match, upper=False, replace_with:Union[dict[str, str],
return match_str
else:
repl = replace_with[match_str.lower()]
if not isinstance(repl, str):
repl = random.choice(repl)
return repl if not upper or "<img" in repl else repl.upper()
def sub_matcher_upper(match, replace_with:Union[dict[str, str], dict[str, List[str]]]=SLURS):