prevent ppl from wasting their progressive stack on boosted users

master
Aevann1 2022-11-12 12:07:58 +02:00
parent b37ebff403
commit 1b162fb049
1 changed files with 3 additions and 0 deletions

View File

@ -312,6 +312,9 @@ def award_thing(v, thing_type, id):
elif kind == "progressivestack":
if not FEATURES['PINS']:
abort(403)
if author.id in BOOSTED_USERS: abort(409, f"This user 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)