From 697e7d60b08719ad17e1516a1af127b8e75aa891 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 22 Dec 2022 00:23:24 +0200 Subject: [PATCH] same as last commit but for @jimjones --- files/helpers/config/const.py | 3 +++ files/routes/routehelpers.py | 2 +- files/routes/users.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index a0ae74c97..d856db284 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -495,6 +495,7 @@ BADGE_BLACKLIST = { # only grantable by AEVANN_ID and SNAKES_ID } NOTIFIED_USERS = {} +DONT_LINK_ALTS = {} if SITE == 'rdrama.net': FEATURES['PRONOUNS'] = True @@ -571,6 +572,8 @@ if SITE == 'rdrama.net': ANTISPAM_BYPASS_IDS = {1703, 13427} + DONT_LINK_ALTS = {253,3161,11163} + BOOSTED_HOLES = { 'furry', 'femboy', diff --git a/files/routes/routehelpers.py b/files/routes/routehelpers.py index 667e13d67..074332407 100644 --- a/files/routes/routehelpers.py +++ b/files/routes/routehelpers.py @@ -34,7 +34,7 @@ def check_for_alts(current:User, include_current_session=True): past_accs = set(session.get("history", [])) if include_current_session else set() def add_alt(user1:int, user2:int): - if SITE == 'rdrama.net' and (user1 in (253,3161) or user2 in (253,3161)): return + if SITE == 'rdrama.net' and (user1 in DONT_LINK_ALTS or user2 in DONT_LINK_ALTS): return li = [user1, user2] existing = g.db.query(Alt).filter(Alt.user1.in_(li), Alt.user2.in_(li)).one_or_none() if not existing: diff --git a/files/routes/users.py b/files/routes/users.py index 006d10b4d..7d12627e9 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -1156,7 +1156,7 @@ def subscribed_posts(v:User, username): @app.post("/fp/") @auth_required def fp(v:User, fp): - if SITE == 'rdrama.net' and v.id in (253,3161): + if SITE == 'rdrama.net' and v.id in DONT_LINK_ALTS: return '', 204 v.fp = fp @@ -1168,7 +1168,7 @@ def fp(v:User, fp): print(f'{v.username}: email', flush=True) users += alts for u in users: - if SITE == 'rdrama.net' and u.id in (253,3161): continue + if SITE == 'rdrama.net' and u.id in DONT_LINK_ALTS: continue li = [v.id, u.id] existing = g.db.query(Alt).filter(Alt.user1.in_(li), Alt.user2.in_(li)).one_or_none() if existing: continue