From 9a2b80e374fc1d3c6f28dbba8ea19d939afadbbd Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 4 Aug 2022 23:20:29 +0200 Subject: [PATCH] spam carp inbox --- files/helpers/const.py | 5 ++--- files/routes/admin.py | 3 --- files/routes/comments.py | 6 ------ files/routes/posts.py | 2 -- files/routes/reporting.py | 2 -- files/routes/users.py | 10 ---------- files/templates/header.html | 2 +- 7 files changed, 3 insertions(+), 27 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index beedcd5f2..401245143 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -187,7 +187,6 @@ BBBB_ID = 0 SCHIZO_ID = 0 A_ID = 0 KIPPY_ID = 0 -GIFT_NOTIF_ID = 9 PIZZASHILL_ID = 0 PIZZA_VOTERS = () IDIO_ID = 0 @@ -205,6 +204,8 @@ MOM_ID = 0 DONGER_ID = 0 GEESE_ID = 0 +GIFT_NOTIF_ID = CARP_ID if CARP_ID else AEVANN_ID + BUG_THREAD = 0 POLL_THREAD = 0 WELCOME_MSG = f"Welcome to {SITE_NAME}!" @@ -250,7 +251,6 @@ if SITE in {'rdrama.net', 'devrama.xyz', 'deuxrama.net'}: SCHIZO_ID = 8494 A_ID = 1230 KIPPY_ID = 7150 - GIFT_NOTIF_ID = 995 PIZZASHILL_ID = 2424 PIZZA_VOTERS = (747,1963,9712) IDIO_ID = 30 @@ -323,7 +323,6 @@ elif SITE == 'watchpeopledie.co': LONGPOSTBOT_ID = 4 ZOZBOT_ID = 5 - GIFT_NOTIF_ID = 9 CARP_ID = 14668 AEVANN_ID = 9 SNAKES_ID = 32 diff --git a/files/routes/admin.py b/files/routes/admin.py index c58de5455..0df86611c 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -959,9 +959,6 @@ def admin_title_change(user_id, v): user = get_account(user_id) - if CARP_ID > 0 and user.id == CARP_ID: - abort(403) - new_name=request.values.get("title").strip()[:256] user.customtitleplain=new_name diff --git a/files/routes/comments.py b/files/routes/comments.py index c2aa4fa25..36b028fef 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -362,8 +362,6 @@ def api_comment(v): v.shadowbanned = 'AutoJanny' notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) - notif = Notification(comment_id=c.id, user_id=AEVANN_ID) - g.db.add(notif) if c.level == 1: c.top_comment_id = c.id else: c.top_comment_id = parent.top_comment_id @@ -732,10 +730,6 @@ def edit_comment(cid, v): if not notif: notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) - notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=AEVANN_ID).one_or_none() - if not notif: - notif = Notification(comment_id=c.id, user_id=AEVANN_ID) - g.db.add(notif) if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower(): return {"error": f'You have to include "{AGENDAPOSTER_PHRASE}" in your comment!'}, 403 diff --git a/files/routes/posts.py b/files/routes/posts.py index 47ece2d59..ffed8a5cf 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -444,7 +444,6 @@ def edit_post(pid, v): v.shadowbanned = 'AutoJanny' g.db.add(v) send_repeatable_notification(CARP_ID, p.permalink) - send_repeatable_notification(AEVANN_ID, p.permalink) if len(body_html) > 40000: return {"error":"Submission body_html too long! (max 40k characters)"}, 400 @@ -923,7 +922,6 @@ def submit_post(v, sub=None): v.shadowbanned = 'AutoJanny' g.db.add(v) send_repeatable_notification(CARP_ID, post.permalink) - send_repeatable_notification(AEVANN_ID, post.permalink) if v and v.admin_level > 2: for option in bet_options: diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 334c35229..c0399f289 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -19,7 +19,6 @@ def api_flag_post(pid, v): if blackjack and any(i in reason.lower() for i in blackjack.split()): v.shadowbanned = 'AutoJanny' send_repeatable_notification(CARP_ID, f"reports on {post.permalink}") - send_repeatable_notification(AEVANN_ID, f"reports on {post.permalink}") reason = reason[:100] @@ -88,7 +87,6 @@ def api_flag_comment(cid, v): if blackjack and any(i in reason.lower() for i in blackjack.split()): v.shadowbanned = 'AutoJanny' send_repeatable_notification(CARP_ID, f"reports on {comment.permalink}") - send_repeatable_notification(AEVANN_ID, f"reports on {comment.permalink}") reason = reason[:100] diff --git a/files/routes/users.py b/files/routes/users.py index de87d9b1a..7522065e2 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -690,11 +690,6 @@ def message2(v, username): notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) g.db.flush() - notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=AEVANN_ID).one_or_none() - if not notif: - notif = Notification(comment_id=c.id, user_id=AEVANN_ID) - g.db.add(notif) - g.db.flush() c.top_comment_id = c.id @@ -767,11 +762,6 @@ def messagereply(v): notif = Notification(comment_id=c.id, user_id=CARP_ID) g.db.add(notif) g.db.flush() - notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=AEVANN_ID).one_or_none() - if not notif: - notif = Notification(comment_id=c.id, user_id=AEVANN_ID) - g.db.add(notif) - g.db.flush() if user_id and user_id not in (v.id, 2, bots): notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=user_id).one_or_none() diff --git a/files/templates/header.html b/files/templates/header.html index 1c7808f96..4f20c3754 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -17,7 +17,7 @@
- {% if v and v.admin_level > 1 and (SITE != 'rdrama.net' or v.id == AEVANN_ID) %} + {% if v and v.admin_level > 1 and SITE != 'rdrama.net' %} People here now: {{g.loggedin_counter}} logged in, {{g.loggedout_counter}} logged out {% else %} {% if SITE_NAME == 'rDrama' %}