From a3d555f4e2796aef8df5a72ef878c2f4fd503277 Mon Sep 17 00:00:00 2001 From: Chuck Sneed Date: Tue, 19 Sep 2023 22:49:38 -0500 Subject: [PATCH] Fix --- files/helpers/config/const.py | 7 +++++++ files/routes/comments.py | 3 ++- files/routes/posts.py | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index c847b857e..391511f60 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -319,6 +319,13 @@ LONGPOSTBOT_REPLIES = ('Wow, you must be a JP fan.', 'This is one of the worst p CHUD_MSG = """:marseypirate: Avast, ye scurvy cur! Yer {type} be walkin' the plank for forgettin' to include `{CHUD_PHRASE}`! We be helpin' ye, right enough - we'll ne'er let ye post or comment anythin' that doesn't be expressin' yer love an' acceptance o' minorities! Heave to an' resubmit yer {type} with `{CHUD_PHRASE}` included, or it'll be the deep six for ye, savvy? This be an automated message; if ye need help, ye can message us ['ere](/contact). Arrr!""" +CHUD_MSGS = [ + ":marseypastor: Hi {user}, We're sorry to say that your {type} has been automatically removed because you forgot to include the phrase `{CHUD_PHRASE}`. Here at our church, we strongly believe that `{CHUD_PHRASE}` and we want to make sure that all of our members feel loved and accepted.If you'd like to resubmit your post, we would be more than happy to take a look at it. In the meantime, if you need any help or have any questions, please don't hesitate to [reach out to us](/contact). We're always here to help. Have a blessed day!" + ":marseyblack: Yo, Ya {type} got automatically removed cuz ya forgot ta include `{CHUD_PHRASE}`. Don't worry, we gotchu! We ain't gonna letcha post or comment nuttin' that don't express ya love and acceptance towards the trans community. Feel free ta resubmit ya comment with `{CHUD_PHRASE}` included. This is an automated message; if ya need help, ya can message us [here](/contact)." + """:marseypirate: Avast, ye scurvy cur! Yer {type} be walkin' the plank for forgettin' to include `{CHUD_PHRASE}`! We be helpin' ye, right enough - we'll ne'er let ye post or comment anythin' that doesn't be expressin' yer love an' acceptance o' minorities! Heave to an' resubmit yer {type} with `{CHUD_PHRASE}` included, or it'll be the deep six for ye, savvy? This be an automated message; if ye need help, ye can message us ['ere](/contact). Arrr!""", + "Hi {user}, Your {type} has been automatically removed because you forgot to include `{CHUD_PHRASE}`. Don't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your comment with `{CHUD_PHRASE}` included. This is an automated message; if you need help, you can message us [here](/contact)." +] + PIN_AWARD_TEXT = " (pin award)" THEMES = ["4chan","classic","classic_dark","coffee","dark","dramblr","light","midnight","tron","win98"] diff --git a/files/routes/comments.py b/files/routes/comments.py index ce6fcdddd..d102de9d5 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -2,6 +2,7 @@ import os from collections import Counter from json import loads from shutil import copyfile +import random import gevent @@ -318,7 +319,7 @@ def comment(v): c.ban_reason = "AutoJanny" g.db.add(c) - body = CHUD_MSG.format(username=v.username, type='comment', CHUD_PHRASE=v.chud_phrase) + body = random.choice(CHUD_MSGS).format(username=v.username, type='comment', CHUD_PHRASE=v.chud_phrase) body_jannied_html = sanitize(body) c_jannied = Comment(author_id=AUTOJANNY_ID, diff --git a/files/routes/posts.py b/files/routes/posts.py index e74a76827..696c95539 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -6,6 +6,7 @@ from os import path from shutil import copyfile from sys import stdout from urllib.parse import urlparse +import random import gevent import requests @@ -647,7 +648,7 @@ def submit_post(v, sub=None): p.is_banned = True p.ban_reason = "AutoJanny" - body = CHUD_MSG.format(username=v.username, type='post', CHUD_PHRASE=v.chud_phrase) + body = random.choice(CHUD_MSGS).format(username=v.username, type='post', CHUD_PHRASE=v.chud_phrase) body_jannied_html = sanitize(body)