mirror of
https://github.com/hypervortex/VH-Bombsquad-Modded-Server-Files
synced 2025-10-16 12:02:51 +00:00
Update profanity.py
This commit is contained in:
parent
2fb17a90bc
commit
3d2fb44886
1 changed files with 125 additions and 48 deletions
173
dist/ba_root/mods/features/profanity.py
vendored
173
dist/ba_root/mods/features/profanity.py
vendored
|
|
@ -1,60 +1,137 @@
|
||||||
# ported from ankit scripts
|
# ported from ankit scripts
|
||||||
# need to update in future with easy to add custom list and more deep analysis .
|
# need to update in future with easy to add custom list and more deep analysis .
|
||||||
# working on other features rn, will update this later , for now lets use this
|
# working on other features rn, will update this later , for now lets use this
|
||||||
|
#recreated by SARA
|
||||||
import re
|
import re
|
||||||
|
|
||||||
PATTERN = (
|
blacklist_word = [
|
||||||
r"fu+c+k|"
|
"fuck",
|
||||||
r"fu+c+($|)|"
|
"shit",
|
||||||
r"fu+k+($|)|"
|
"bitch",
|
||||||
r"\w*ph+u*c+k\w*\b|"
|
"asshole",
|
||||||
r"\b\w+ch+o+d|"
|
"cunt",
|
||||||
r"randi+|"
|
"dick",
|
||||||
r"chu+t\w*\b|"
|
"cock",
|
||||||
r"chh+a+k+[ae]|"
|
"pussy",
|
||||||
r"hijd\w|"
|
"whore",
|
||||||
r"lund\b|"
|
"bastard",
|
||||||
r"\bass\b|"
|
"slut",
|
||||||
r"asshole|"
|
"motherfucker",
|
||||||
r"bi*tch|"
|
"douchebag",
|
||||||
r"cock|"
|
"wanker",
|
||||||
r"\bga+nd\b|"
|
"asshat",
|
||||||
r"ga+ndu|"
|
"twat",
|
||||||
r"tharki|"
|
"bollocks",
|
||||||
r"tatti|"
|
"crap",
|
||||||
r"lod\w\b|"
|
"damn",
|
||||||
r"jha+nt|"
|
"goddamn",
|
||||||
r"pu+s+y|"
|
"hell",
|
||||||
r"pu+z+y|"
|
"bugger",
|
||||||
r"di+c+k|"
|
"arse",
|
||||||
r"\b([mb]+c+)+\b|"
|
"prick",
|
||||||
r"\b[mb]+[^a-zA-Z]?c+\b|"
|
"idiot",
|
||||||
r"f.u.c.k|"
|
"moron",
|
||||||
r"b\w*s\w?d\w?k|"
|
"loser",
|
||||||
r"m.{0,4}d.?a.{0,8}c.?h.?o.?d|"
|
"jerk",
|
||||||
r"b.+n.?c.?h.?o.?d|"
|
"dipshit",
|
||||||
r"cunt|"
|
"dumbass",
|
||||||
r"my+r+e|"
|
"nigger",
|
||||||
r"th+y+r|"
|
"retard",
|
||||||
r"th+y+i+r|"
|
"fucktard",
|
||||||
r"th+aa+y+o+l+i|"
|
"douche",
|
||||||
r"th+a+y+o+l+i|"
|
"fuckface",
|
||||||
r"ku+nn+a+n|"
|
"fuckhead",
|
||||||
r"na+y+i+n+t+e|"
|
"shithead",
|
||||||
r"pu+ll+u|"
|
"cockhead",
|
||||||
r"la+(u|v)+d+\w\b|"
|
"dickhead",
|
||||||
r"chu+d\w*\b|"
|
"asshead",
|
||||||
"sex+($|)|"
|
"bitchass",
|
||||||
r"bo+b(s|z)|"
|
"cuntface",
|
||||||
r"po+r+n|"
|
"pisshead",
|
||||||
r"ni+p+le+"
|
"assclown",
|
||||||
)
|
"bullshit",
|
||||||
|
"piss off",
|
||||||
|
"suck",
|
||||||
|
"sucker",
|
||||||
|
"fuck off",
|
||||||
|
"jackass",
|
||||||
|
"son of a bitch",
|
||||||
|
"arsehole",
|
||||||
|
"fuckwit",
|
||||||
|
"asswipe",
|
||||||
|
"turd",
|
||||||
|
"fuckface",
|
||||||
|
"fucknut",
|
||||||
|
"shitface",
|
||||||
|
"shitbag",
|
||||||
|
"shit-for-brains",
|
||||||
|
"dickwad",
|
||||||
|
"dickweed",
|
||||||
|
"piss off",
|
||||||
|
"motherfucking",
|
||||||
|
"cockgobbler",
|
||||||
|
"twatwaffle",
|
||||||
|
"cumstain",
|
||||||
|
"fuckery",
|
||||||
|
"fucker",
|
||||||
|
"fucked",
|
||||||
|
"shitstorm",
|
||||||
|
"shitshow",
|
||||||
|
"bullshit",
|
||||||
|
"bullshitter",
|
||||||
|
"clusterfuck",
|
||||||
|
"cunthammer",
|
||||||
|
"cuntlicker",
|
||||||
|
"cumdumpster",
|
||||||
|
"fucktastic",
|
||||||
|
"shitload",
|
||||||
|
"shitbag",
|
||||||
|
"shitfaced",
|
||||||
|
"shitload",
|
||||||
|
"shitfucker",
|
||||||
|
"fuckface",
|
||||||
|
"fucknugget",
|
||||||
|
"fuckstick",
|
||||||
|
"fucktard",
|
||||||
|
"fuckup",
|
||||||
|
"motherfucker",
|
||||||
|
"motherfucking",
|
||||||
|
"motherfucked",
|
||||||
|
"motherfuck",
|
||||||
|
"motherfucks",
|
||||||
|
"pissed off",
|
||||||
|
"pissed",
|
||||||
|
"pissing",
|
||||||
|
"pisses",
|
||||||
|
"pisshead",
|
||||||
|
"pisshead",
|
||||||
|
"pissed off",
|
||||||
|
"son of a bitch",
|
||||||
|
"son of a whore",
|
||||||
|
"son of a cunt",
|
||||||
|
"son of a dick",
|
||||||
|
"son of an ass",
|
||||||
|
"twat",
|
||||||
|
"twat",
|
||||||
|
"twatted",
|
||||||
|
"twatting",
|
||||||
|
"twats",
|
||||||
|
"whore",
|
||||||
|
"whore",
|
||||||
|
"whored",
|
||||||
|
"whoring",
|
||||||
|
"whores",
|
||||||
|
"ass",
|
||||||
|
# Add more words as needed
|
||||||
|
]
|
||||||
|
|
||||||
def censor(message):
|
def censor(message):
|
||||||
|
profane_list = blacklist_word
|
||||||
|
pattern = "|".join(r"\b{}\b".format(re.escape(word)) for word in profane_list)
|
||||||
censored_message = re.sub(
|
censored_message = re.sub(
|
||||||
PATTERN,
|
pattern,
|
||||||
lambda match: "*" * len(match.group()),
|
lambda match: "*" * len(match.group()),
|
||||||
message,
|
message,
|
||||||
flags=re.IGNORECASE
|
flags=re.IGNORECASE
|
||||||
)
|
)
|
||||||
return censored_message
|
return censored_message
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue