Compare commits

...

2 Commits

Author SHA1 Message Date
Aevann 386e55a748 add word alert regex 2024-04-26 02:27:06 +03:00
Aevann c2d82ef02c stop chud and queen hats from being much more likely 2024-04-26 02:22:13 +03:00
4 changed files with 10 additions and 29 deletions

View File

@ -392,10 +392,7 @@ class User(Base):
user_forced_hats = []
for k, val in forced_hats.items():
if getattr(self, k) and getattr(self, k) > 1:
if isinstance(val[0], tuple):
user_forced_hats.append(random.choice(val))
else:
user_forced_hats.append(val)
user_forced_hats.append(val)
if user_forced_hats: return random.choice(user_forced_hats)
else: return None

View File

@ -169,7 +169,11 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, obj=None, followers_ping=Tr
user_ids = get_users(names, ids_only=True, graceful=True)
notify_users.update(user_ids)
if SITE_NAME == "WPD" and (('daisy' in text and 'destruction' in text) or ('kill myself' in text and obj and isinstance(obj, Post))):
if SITE_NAME == "WPD" and (
('daisy' in text and 'destruction' in text)
or ('kill myself' in text and obj and isinstance(obj, Post))
or word_alert_regex.search(text)
):
admin_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_SPECIFIC_WPD_COMMENTS'], User.id != AEVANN_ID)]
notify_users.update(admin_ids)

View File

@ -986,30 +986,8 @@ forced_hats = {
"earlylife": ("The Merchant", "SHUT IT DOWN, the goys know!"),
"marsify": ("Marsified", "I can't pick my own Marseys, help!"),
"is_banned": ("Behind Bars", "This user is banned and needs to do better!"),
"chud": (
("Egg_irl", "This user is getting in touch with xir identity!"),
("Trans Flag", "Just in case you forgot, trans lives matter."),
("Trans Flag II", "Your egg is cracked; wear it with pride!"),
("Pride Flag", "Never forget that this is a primarily gay community. Dude bussy lmao."),
("Pride Flag II", "This user is a proud supporter of LGBTQ+ rights."),
),
"queen": (
("Flower Crown I", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown II", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown III", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown IV", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown V", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown VI", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown VII", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown VIII", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown IX", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown X", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown XI", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown XII", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown XIII", "This user is getting in touch with her feminine side 🥰"),
("Flower Crown XIV", "This user is getting in touch with her feminine side 🥰"),
("Emoji Crown (hearts and shooting stars)", "This user is getting in touch with her feminine side 🥰")
),
"chud": ("Egg_irl", "This user is getting in touch with xir identity!"),
"queen": ("Flower Crown I", "This user is getting in touch with her feminine side 🥰"),
}

View File

@ -161,6 +161,8 @@ html_title_regex = re.compile("<title>(.{1,200})</title>", flags=re.I)
excessive_css_scale_regex = re.compile("scale\([^)]*?(\d{2})", flags=re.A)
word_alert_regex = re.compile(r'\b(764|o9a|9 angles|hurtcore|pthc)\b', flags=re.A|re.I)
commands = {
"fortune": FORTUNE_REPLIES,
"factcheck": FACTCHECK_REPLIES,