From 5ee418fcbb8317aa97524314fbae03d3461d47b0 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 18 Oct 2021 19:55:07 +0200 Subject: [PATCH] gh --- files/classes/award.py | 8 ++++++++ files/classes/user.py | 8 ++++++++ files/routes/awards.py | 30 ++++++++++++++++++++++++++++-- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/files/classes/award.py b/files/classes/award.py index 2756266fa..f321ad1cc 100755 --- a/files/classes/award.py +++ b/files/classes/award.py @@ -31,6 +31,14 @@ if site_name == "Drama": "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 + }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 500 } } else: diff --git a/files/classes/user.py b/files/classes/user.py index 8924afe85..cf6f430c1 100755 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -48,6 +48,14 @@ if site_name == "Drama": "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 + }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 500 } } else: diff --git a/files/routes/awards.py b/files/routes/awards.py index 464036127..07d6886a9 100755 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -35,6 +35,14 @@ def shop(v): "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 + }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 500 } } else: @@ -112,6 +120,14 @@ def buy(v, award): "icon": "fas fa-sparkles", "color": "text-warning", "price": 500 + }, + "grass": { + "kind": "grass", + "title": "Grass", + "description": "Ban the author permenantly (must provide a timestamped picture of them touching grass to the admins to get unbanned)", + "icon": "fas fa-seedling", + "color": "text-success", + "price": 500 } } else: @@ -175,14 +191,24 @@ def banaward_trigger(post=None, comment=None): send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for yet another day for {link}. Seriously man?") +def grass_trigger(post=None, comment=None): + + author = post.author if post else comment.author + link = f"[this post]({post.permalink})" if post else f"[this comment]({comment.permalink})" + + author.ban(reason="grass award used") + send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended permenantly for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!") + ACTIONS = { - "ban": banaward_trigger + "ban": banaward_trigger, + "grass": grass_trigger } ALLOW_MULTIPLE = ( "ban", "shit", - "fireflies" + "fireflies", + "grass" ) @app.post("/post//awards")