From 4d0e1eb0941e08ea0ecc432895620cebbc2da5d7 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 24 Nov 2021 00:48:16 +0200 Subject: [PATCH] fdsfds --- files/routes/awards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/awards.py b/files/routes/awards.py index b0c2d3a657..1d31ef1ab9 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -561,6 +561,7 @@ def award_post(pid, v): else: author.longpost = time.time() + 86400 send_notification(IDIO_ID, f"@{v.username} used {kind} award on {request.host_url}{post.shortlink}") elif kind == "bird": + if author.longpost: return {"error": "This user is the under the effect of a conflicting award: Pizzashill award."}, 404 if author.bird: author.bird += 86400 else: author.bird = time.time() + 86400 elif kind == "eye": @@ -704,6 +705,8 @@ def award_comment(cid, v): else: author.longpost = time.time() + 86400 send_notification(IDIO_ID, f"@{v.username} used {kind} award on {request.host_url}{c.shortlink}") elif kind == "bird": + if author.longpost: + return {"error": "This user is the under the effect of a conflicting award: Pizzashill award."}, 404 if author.bird: author.bird += 86400 else: author.bird = time.time() + 86400 elif kind == "eye":