forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-01-06 23:18:22 +02:00
parent 101aa43006
commit de30fd53c7
3 changed files with 1 additions and 144 deletions

View File

@ -142,16 +142,6 @@ AGENDAPOSTER_MSG = """Hi @{username},\n\nYour comment has been automatically rem
included. \n\n*This is an automated message; if you need help,
you can message us [here](/contact).*"""
VAXX_MSG = """Hi @{username}, it appears that you may be trying to spread dangerous misinformation regarding ineffective COVID-19 treatments based on pseudoscientific hearsay. Your post has been removed because it contained the word ivermectin. We ask that you understand that horse dewormer neither treats, nor prevents, COVID-19. For more information, please read up on what the FDA has to say on the matter:
https://www.fda.gov/consumers/consumer-updates/why-you-should-not-use-ivermectin-treat-or-prevent-covid-19
COVID-19 is not a joke, it is a global pandemic and it has been hard on all of us. It will likely go down as one of the most defining periods of our generation. Many of us have lost loved ones to the virus. It has caused confusion, fear, frustration, and served to further divide us. Tens of millions around the world have died. There is nothing to be gained by spreading bad science based on very understandable fear.
The only proven method of prevention is the COVID-19 vaccine, paired with appropriate social distancing, handwashing, and masks. Vaccines are free in the United States - if you'd like to locate your nearest vaccine provider, please visit https://www.vaccines.gov/ and schedule an appointment today.
Thank you."""
if SITE == 'rdrama.net':
PW_ID = 3750
BASEDBOT_ID = 0
@ -163,7 +153,7 @@ if SITE == 'rdrama.net':
ZOZBOT_ID = 1833
AUTOPOLLER_ID = 6176
AUTOBETTER_ID = 7668
TAX_RECEIVER_ID = 747
TAX_RECEIVER_ID = 995
PIZZA_SHILL_ID = 2424
IDIO_ID = 30
CARP_ID = 995

View File

@ -343,40 +343,6 @@ def api_comment(v):
n = Notification(comment_id=c_based.id, user_id=v.id)
g.db.add(n)
if request.host == "rdrama.net" and "ivermectin" in c.body.lower():
c.is_banned = True
c.ban_reason = "AutoJanny"
g.db.add(c)
body2 = VAXX_MSG.format(username=v.username)
body_md = CustomRenderer().render(mistletoe.Document(body2))
body_jannied_html = sanitize(body_md)
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=parent_submission,
distinguish_level=6,
parent_comment_id=c.id,
level=level+1,
is_bot=True,
body_html=body_jannied_html,
top_comment_id=c.top_comment_id
)
g.db.add(c_jannied)
g.db.flush()
n = Notification(comment_id=c_jannied.id, user_id=v.id)
g.db.add(n)
if v.agendaposter and not v.marseyawarded and "trans lives matter" not in c.body_html.lower():
c.is_banned = True
@ -719,40 +685,6 @@ def edit_comment(cid, v):
c.body = body[:10000]
c.body_html = body_html
if request.host == "rdrama.net" and "ivermectin" in c.body_html.lower():
c.is_banned = True
c.ban_reason = "AutoJanny"
g.db.add(c)
body = VAXX_MSG.format(username=v.username)
body_md = CustomRenderer().render(mistletoe.Document(body))
body_jannied_html = sanitize(body_md)
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=c.parent_submission,
distinguish_level=6,
parent_comment_id=c.id,
level=c.level+1,
is_bot=True,
body_html=body_jannied_html,
top_comment_id=c.top_comment_id
)
g.db.add(c_jannied)
g.db.flush()
n = Notification(comment_id=c_jannied.id, user_id=v.id)
g.db.add(n)
if v.agendaposter and not v.marseyawarded and "trans lives matter" not in c.body_html.lower():
c.is_banned = True

View File

@ -495,39 +495,6 @@ def edit_post(pid, v):
p.body_html = body_html
if request.host == "rdrama.net" and "ivermectin" in body_html.lower():
p.is_banned = True
p.ban_reason = "AutoJanny"
g.db.add(p)
body = VAXX_MSG.format(username=v.username)
body_md = CustomRenderer().render(mistletoe.Document(body))
body_jannied_html = sanitize(body_md)
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=p.id,
level=1,
over_18=False,
is_bot=True,
app_id=None,
is_pinned='AutoJanny',
distinguish_level=6,
body_html=body_jannied_html,
)
g.db.add(c_jannied)
g.db.flush()
n = Notification(comment_id=c_jannied.id, user_id=v.id)
g.db.add(n)
if v.agendaposter and not v.marseyawarded and "trans lives matter" not in body_html.lower():
p.is_banned = True
@ -1063,38 +1030,6 @@ def submit_post(v):
if new_post.club and not user.paid_dues: continue
add_notif(cid, user.id)
if request.host == "rdrama.net" and "ivermectin" in new_post.body_html.lower():
new_post.is_banned = True
new_post.ban_reason = "AutoJanny"
body = VAXX_MSG.format(username=v.username)
body_md = CustomRenderer().render(mistletoe.Document(body))
body_jannied_html = sanitize(body_md)
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=new_post.id,
level=1,
over_18=False,
is_bot=True,
app_id=None,
is_pinned='AutoJanny',
distinguish_level=6,
body_html=body_jannied_html,
)
g.db.add(c_jannied)
g.db.flush()
n = Notification(comment_id=c_jannied.id, user_id=v.id)
g.db.add(n)
if v.agendaposter and not v.marseyawarded and "trans lives matter" not in new_post.body_html.lower():
new_post.is_banned = True