From 9c2761737b4cd46235ed49d73bef0da25a1a2494 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 30 Mar 2024 22:19:25 +0200 Subject: [PATCH] =?UTF-8?q?awards=20shouldn=E2=80=99t=20have=20an=20effect?= =?UTF-8?q?=20from=20shadowbanned=20ppl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/routes/awards.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index 12a2013e02..88ead818a2 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -166,10 +166,14 @@ def award_thing(v, thing_type, id): if v.house: AWARDS[v.house] = HOUSE_AWARDS[v.house] - if kind not in AWARDS: abort(404, "This award doesn't exist") + if kind not in AWARDS: + abort(404, "This award doesn't exist") award_title = AWARDS[kind]['title'] + if v.shadowbanned: + return {"message": f"{award_title} award given to {thing_type} successfully!"} + if obj.is_longpost and kind in {"ectoplasm", "candycorn", "candycane", "stab", "tilt", "queen", "chud", "marsify", "Furry", "Edgy", "Femboy", "Furry Founder", "Edgy Founder", "Femboy Founder"}: abort(403, f'Long posts are protected from the {award_title} award!')