forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-02-01 06:44:05 +02:00
parent a88687ceda
commit ed518e7936
4 changed files with 26 additions and 9 deletions

View File

@ -559,5 +559,5 @@ REDDIT_NOTIFS = {
}
no_pass_phrase = """<p>Sorry whiteboy, we're gonna need to see some ID before you start throwin that word around like it's nothing.\n\nTake a 5 minute time-out and come back when you've learned your lesson and/or paid reparations (by purchasing a BIPOC Approved™ Rdrama NWord Pass© from the shop) \n\n<em>This is an automated message; if you need help,+
no_pass_phrase = """<p>Sorry whiteboy, we're gonna need to see some ID before you start throwin that word around like it's nothing.\n\nTake a 10 minute time-out and come back when you've learned your lesson and/or paid reparations (by purchasing a BIPOC Approved™ Rdrama NWord Pass© from the <a href="/shop">shop</a>) \n\n<em>This is an automated message; if you need help,+
you can message us <a href="/contact">here</a>.</em></p>"""

View File

@ -434,6 +434,8 @@ def badge_grant_post(v):
try: badge_id = int(request.values.get("badge_id"))
except: abort(400)
if badge_id in (94,95,96,97,98,109): abort(403)
if user.has_badge(badge_id):
return render_template("admin/badge_grant.html", v=v, badge_types=badges, error="User already has that badge.")

View File

@ -418,6 +418,10 @@ def api_comment(v):
elif 'nigg' in c.body.lower() and not v.nwordpass:
c.is_banned = True
c.ban_reason = "AutoJanny"
g.db.add(c)
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=parent_submission,
distinguish_level=6,
@ -432,9 +436,9 @@ def api_comment(v):
g.db.add(c_jannied)
g.db.flush()
v.ban(reason="White people nonsense.", days=0.00347223)
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 5 minutes for the following reason:\n\n> Unsanctioned NWord"
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
send_repeatable_notification(v.id, text)
n = Notification(comment_id=c_jannied.id, user_id=v.id)
@ -793,6 +797,10 @@ def edit_comment(cid, v):
elif 'nigg' in c.body.lower() and not v.nwordpass:
c.is_banned = True
c.ban_reason = "AutoJanny"
g.db.add(c)
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=c.parent_submission,
distinguish_level=6,
@ -807,9 +815,9 @@ def edit_comment(cid, v):
g.db.add(c_jannied)
g.db.flush()
v.ban(reason="White people nonsense.", days=0.00347223)
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 5 minutes for the following reason:\n\n> Unsanctioned NWord"
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
send_repeatable_notification(v.id, text)
n = Notification(comment_id=c_jannied.id, user_id=v.id)

View File

@ -522,6 +522,10 @@ def edit_post(pid, v):
elif 'nigg' in f'{p.body}{p.title}'.lower() and not v.nwordpass:
p.is_banned = True
p.ban_reason = "AutoJanny"
g.db.add(p)
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=p.id,
level=1,
@ -537,9 +541,9 @@ def edit_post(pid, v):
g.db.add(c_jannied)
g.db.flush()
v.ban(reason="White people nonsense.", days=0.00347223)
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 5 minutes for the following reason:\n\n> Unsanctioned NWord"
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
send_repeatable_notification(v.id, text)
n = Notification(comment_id=c_jannied.id, user_id=v.id)
@ -1109,6 +1113,9 @@ def submit_post(v):
elif 'nigg' in f'{new_post.body}{new_post.title}'.lower() and not v.nwordpass:
new_post.is_banned = True
new_post.ban_reason = "AutoJanny"
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
parent_submission=new_post.id,
level=1,
@ -1123,9 +1130,9 @@ def submit_post(v):
g.db.add(c_jannied)
g.db.flush()
v.ban(reason="White people nonsense.", days=0.00347223)
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 5 minutes for the following reason:\n\n> Unsanctioned NWord"
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
send_repeatable_notification(v.id, text)
n = Notification(comment_id=c_jannied.id, user_id=v.id)