From da643ea88b37e19af6ae9fe4fd4ea32e9279740e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 4 Dec 2022 21:30:33 +0200 Subject: [PATCH] sneed --- files/helpers/awards.py | 4 ++-- files/helpers/const.py | 14 -------------- files/routes/awards.py | 9 ++++----- files/routes/votes.py | 2 +- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/files/helpers/awards.py b/files/helpers/awards.py index 9382f3fbb5..543f57756a 100644 --- a/files/helpers/awards.py +++ b/files/helpers/awards.py @@ -47,7 +47,7 @@ def award_timers(v, bot=False): notify_if_not_bot("Your bird site award has expired!") badge = v.has_badge(95) if badge: g.db.delete(badge) - if v.progressivestack and v.progressivestack < now: + if v.progressivestack and v.progressivestack != 1 and v.progressivestack < now: v.progressivestack = None notify_if_not_bot("Your progressive stack has expired!") badge = v.has_badge(94) @@ -76,7 +76,7 @@ def award_timers(v, bot=False): notify_if_not_bot("Your earlylife status has expired!") badge = v.has_badge(169) if badge: g.db.delete(badge) - if v.marsify and v.marsify < now and v.marsify != 1: + if v.marsify and v.marsify != 1 and v.marsify < now: v.marsify = 0 if SITE_NAME != 'rDrama': notify_if_not_bot("Your marsify status has expired!") badge = v.has_badge(170) diff --git a/files/helpers/const.py b/files/helpers/const.py index 5b2e003192..fa1dd572f1 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -557,20 +557,6 @@ if SITE == 'rdrama.net': 'programming', } - BOOSTED_USERS = { - IMPASSIONATA_ID, - PIZZASHILL_ID, - SNAKES_ID, - JUSTCOOL_ID, - 2008, #TransGirlTradWife - 29, #QuadNarca - JOAN_ID, - 4389, #WorldAroundEwe - 5526, #Dramarama - 3635, #HeyMoon - 3377, #MIMW - } - GIFT_NOTIF_ID = CARP_ID POLL_THREAD = 79285 diff --git a/files/routes/awards.py b/files/routes/awards.py index 5106ef8e75..4e87ab2a4c 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -321,11 +321,10 @@ def award_thing(v, thing_type, id): if not FEATURES['PINS']: abort(403) - if author.id in BOOSTED_USERS: abort(409, f"@{author.username} is already permanently progressive-stacked!") - - if author.progressivestack: author.progressivestack += 21600 - else: author.progressivestack = int(time.time()) + 21600 - badge_grant(user=author, badge_id=94) + if author.progressivestack != 1: + if author.progressivestack: author.progressivestack += 21600 + else: author.progressivestack = int(time.time()) + 21600 + badge_grant(user=author, badge_id=94) elif kind == "benefactor": if author.patron: abort(409, f"@{author.username} is already a {patron.lower()}!") author.patron = 1 diff --git a/files/routes/votes.py b/files/routes/votes.py index 866e05548b..d52a4e6965 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -170,7 +170,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): target.realupvotes = get_vote_count(0, True) # first arg is ignored here mul = 1 - if target.author.progressivestack or target.author.id in BOOSTED_USERS: + if target.author.progressivestack: mul = 2 if cls == Submission: if (target.domain.endswith('.win')