From d9ef62b9c632b0489b14cdbbd75361eaade8dccd Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 29 Oct 2022 23:34:34 +0200 Subject: [PATCH] prevent ppl from wasting their chud awards --- files/routes/awards.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index 93b7e0b11..58b814895 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -246,10 +246,13 @@ def award_thing(v, thing_type, id): cache.delete_memoized(frontlist) else: thing.stickied_utc = t g.db.add(thing) - elif kind == "agendaposter" and not (author.agendaposter and author.agendaposter == 0): + elif kind == "agendaposter": if author.marseyawarded: abort(409, "This user is under the effect of a conflicting award: Marsey award.") + if author.agendaposter and author.agendaposter == 0: + abort(409, "This user is perma-chudded.") + if author.agendaposter and time.time() < author.agendaposter: author.agendaposter += 86400 else: author.agendaposter = int(time.time()) + 86400