From 1e5e7c878147c2a2864e6951408c44786cd29787 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 20 Oct 2023 18:56:26 +0300 Subject: [PATCH] make distinguished posts immune to cosmetic awards --- files/routes/awards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/awards.py b/files/routes/awards.py index de2a29950..4c4f8ea8d 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -199,6 +199,9 @@ def award_thing(v, thing_type, id): if thing_type == 'post' and thing.id == 210983: abort(403, "You can't award this post!") + if thing_type == 'post' and thing.distinguish_level and AWARDS[kind]['cosmetic']: + abort(403, "Distinguished posts are immune to cosmetic awards!") + if kind == "benefactor": if author.id == v.id: abort(403, "You can't use this award on yourself!")