From 358f0919955a2e764f01d0ff0be2813b6c580509 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 20 Oct 2021 22:17:10 +0200 Subject: [PATCH] gf --- files/routes/admin.py | 15 +++++++++++---- files/routes/settings.py | 5 +++++ files/templates/submission.html | 8 ++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index cd0aaa5dd..4daf94042 100755 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -173,27 +173,29 @@ def monthly(v): for u in g.db.query(User).options(lazyload('*')).filter(User.patron > 0).all(): grant_awards = {} - if u.id == 1376: - grant_awards["fireflies"] = 40 - grant_awards["ban"] = 10 - elif u.patron == 1: + if u.patron == 1: grant_awards["shit"] = 1 grant_awards["fireflies"] = 1 + grant_awards["train"] = 1 elif u.patron == 2: grant_awards["shit"] = 2 grant_awards["fireflies"] = 2 + grant_awards["train"] = 2 grant_awards["ban"] = 1 elif u.patron == 3: grant_awards["shit"] = 5 grant_awards["fireflies"] = 5 + grant_awards["train"] = 5 grant_awards["ban"] = 2 elif u.patron == 4: grant_awards["shit"] = 10 grant_awards["fireflies"] = 10 + grant_awards["train"] = 10 grant_awards["ban"] = 5 elif u.patron == 5 or u.patron == 8: grant_awards["shit"] = 20 grant_awards["fireflies"] = 20 + grant_awards["train"] = 20 grant_awards["ban"] = 10 @@ -418,25 +420,30 @@ def badge_grant_post(v): if user.discord_id: add_role(user, "1") grant_awards["shit"] = 1 grant_awards["fireflies"] = 1 + grant_awards["train"] = 1 elif badge_id == 22: if user.discord_id: add_role(user, "2") grant_awards["shit"] = 2 grant_awards["fireflies"] = 2 + grant_awards["train"] = 2 grant_awards["ban"] = 1 elif badge_id == 23: if user.discord_id: add_role(user, "3") grant_awards["shit"] = 5 grant_awards["fireflies"] = 5 + grant_awards["train"] = 5 grant_awards["ban"] = 2 elif badge_id in [24, 28]: if user.discord_id: add_role(user, "4") grant_awards["shit"] = 10 grant_awards["fireflies"] = 10 + grant_awards["train"] = 10 grant_awards["ban"] = 5 elif badge_id == 25: if user.discord_id: add_role(user, "5") grant_awards["shit"] = 20 grant_awards["fireflies"] = 20 + grant_awards["train"] = 20 grant_awards["ban"] = 10 if len(grant_awards): diff --git a/files/routes/settings.py b/files/routes/settings.py index 0ad19ceb2..0ed828e20 100755 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -309,25 +309,30 @@ def gumroad(v): if v.discord_id: add_role(v, "1") grant_awards["shit"] = 1 grant_awards["fireflies"] = 1 + grant_awards["train"] = 1 elif tier == 2: if v.discord_id: add_role(v, "2") grant_awards["shit"] = 2 grant_awards["fireflies"] = 2 + grant_awards["train"] = 2 grant_awards["ban"] = 1 elif tier == 3: if v.discord_id: add_role(v, "3") grant_awards["shit"] = 5 grant_awards["fireflies"] = 5 + grant_awards["train"] = 5 grant_awards["ban"] = 2 elif tier == 4: if v.discord_id: add_role(v, "4") grant_awards["shit"] = 10 grant_awards["fireflies"] = 10 + grant_awards["train"] = 10 grant_awards["ban"] = 5 elif tier == 5 or tier == 8: if v.discord_id: add_role(v, "5") grant_awards["shit"] = 20 grant_awards["fireflies"] = 20 + grant_awards["train"] = 20 grant_awards["ban"] = 10 thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id diff --git a/files/templates/submission.html b/files/templates/submission.html index 878e844f5..d64a1e8de 100755 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -17,19 +17,19 @@