From 94151bf2d6c04cda668f6bf243f74a7cfeb52575 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 25 May 2022 21:45:03 +0200 Subject: [PATCH] fsd --- files/routes/awards.py | 9 +++++++++ files/routes/posts.py | 3 +++ files/templates/submit.html | 15 ++++++--------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index 9e5fadb50..33cf79398 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -185,6 +185,8 @@ def award_post(pid, v): elif author.unban_utc: author.unban_utc += 86400 send_repeatable_notification(author.id, f"Your account has been banned for **yet another day** for {link}. Seriously man?") + if request.host == 'rdrama.net' and v.id == CARP_ID: + send_repeatable_notification(AEVANN_ID, link) elif kind == "unban": if not author.is_suspended or not author.unban_utc or time.time() > author.unban_utc: abort(403) @@ -202,6 +204,8 @@ def award_post(pid, v): author.unban_utc = int(time.time()) + 30 * 86400 link = f"[this post]({post.shortlink})" send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!") + if request.host == 'rdrama.net' and v.id == CARP_ID: + send_repeatable_notification(AEVANN_ID, link) elif kind == "pin": if post.stickied and post.stickied_utc: post.stickied_utc += 3600 @@ -429,6 +433,9 @@ def award_comment(cid, v): elif author.unban_utc: author.unban_utc += 86400 send_repeatable_notification(author.id, f"Your account has been banned for **yet another day** for {link}. Seriously man?") + if request.host == 'rdrama.net' and v.id == CARP_ID: + send_repeatable_notification(AEVANN_ID, link) + elif kind == "unban": if not author.is_suspended or not author.unban_utc or time.time() > author.unban_utc: abort(403) @@ -446,6 +453,8 @@ def award_comment(cid, v): author.unban_utc = int(time.time()) + 30 * 86400 link = f"[this comment]({c.shortlink})" send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!") + if request.host == 'rdrama.net' and v.id == CARP_ID: + send_repeatable_notification(AEVANN_ID, link) elif kind == "pin": if c.is_pinned and c.is_pinned_utc: c.is_pinned_utc += 3600 else: diff --git a/files/routes/posts.py b/files/routes/posts.py index 1448e7473..9f9425606 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1366,6 +1366,9 @@ def submit_post(v, sub=None): post.upvotes += 3 g.db.add(post) + if request.host == 'rdrama.net' and v.id == CARP_ID: + send_repeatable_notification(AEVANN_ID, post.permalink) + g.db.commit() cache.delete_memoized(frontlist) diff --git a/files/templates/submit.html b/files/templates/submit.html index 8c15afb96..64c9040db 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -118,17 +118,14 @@ -
- - -
- Toggle preview -
- -
+ +
+ Toggle preview
+
+

@@ -226,7 +223,7 @@ - + {% include "emoji_modal.html" %} {% include "gif_modal.html" %}