permenantly

remotes/1693045480750635534/spooky-22
Aevann1 2022-02-25 19:25:31 +02:00
parent 20a9c9c39c
commit 18fb196922
4 changed files with 18 additions and 18 deletions

View File

@ -1026,11 +1026,11 @@ def ban_user(user_id, v):
user.ban(admin=v, reason=passed_reason, days=days)
if days:
if reason: text = f"Your account has been suspended for {days} days for the following reason:\n\n> {reason}"
else: text = f"Your account has been suspended for {days} days."
if reason: text = f"Your account has been banned for **{days}** days for the following reason:\n\n> {reason}"
else: text = f"Your account has been banned for **{days}** days."
else:
if reason: text = f"Your account has been permanently suspended for the following reason:\n\n> {reason}"
else: text = "Your account has been permanently suspended."
if reason: text = f"Your account has been permanently banned for the following reason:\n\n> {reason}"
else: text = "Your account has been permanently banned."
send_repeatable_notification(user.id, text)

View File

@ -240,10 +240,10 @@ def award_post(pid, v):
if not author.is_suspended:
author.ban(reason=f"1-Day ban award used by @{v.username} on /post/{post.id}", days=1)
send_repeatable_notification(author.id, f"Your account has been suspended for a day for {link}. It sucked and you should feel bad.")
send_repeatable_notification(author.id, f"Your account has been banned for **a day** for {link}. It sucked and you should feel bad.")
elif author.unban_utc:
author.unban_utc += 86400
send_repeatable_notification(author.id, f"Your account has been suspended for yet another day for {link}. Seriously man?")
send_repeatable_notification(author.id, f"Your account has been banned for **yet another day** for {link}. Seriously man?")
elif kind == "unban":
if not author.is_suspended or not author.unban_utc or time.time() > author.unban_utc: abort(403)
@ -260,7 +260,7 @@ def award_post(pid, v):
author.ban_reason = f"grass award used by @{v.username} on /post/{post.id}"
author.unban_utc = int(time.time()) + 30 * 86400
link = f"[this post]({post.shortlink})"
send_repeatable_notification(author.id, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!")
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 to get unbanned!")
elif kind == "pin":
if post.stickied and post.stickied_utc:
post.stickied_utc += 3600
@ -473,10 +473,10 @@ def award_comment(cid, v):
if not author.is_suspended:
author.ban(reason=f"1-Day ban award used by @{v.username} on /comment/{c.id}", days=1)
send_repeatable_notification(author.id, f"Your account has been suspended for a day for {link}. It sucked and you should feel bad.")
send_repeatable_notification(author.id, f"Your account has been banned for **a day** for {link}. It sucked and you should feel bad.")
elif author.unban_utc:
author.unban_utc += 86400
send_repeatable_notification(author.id, f"Your account has been suspended for yet another day for {link}. Seriously man?")
send_repeatable_notification(author.id, f"Your account has been banned for **yet another day** for {link}. Seriously man?")
elif kind == "unban":
if not author.is_suspended or not author.unban_utc or time.time() > author.unban_utc: abort(403)
@ -493,7 +493,7 @@ def award_comment(cid, v):
author.ban_reason = f"grass award used by @{v.username} on /comment/{c.id}"
author.unban_utc = int(time.time()) + 30 * 86400
link = f"[this comment]({c.shortlink})"
send_repeatable_notification(author.id, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!")
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 to get unbanned!")
elif kind == "pin":
if c.is_pinned and c.is_pinned_utc: c.is_pinned_utc += 3600
else:

View File

@ -353,7 +353,7 @@ def api_comment(v):
threshold *= 2
if len(similar_comments) > threshold:
text = "Your account has been suspended for 1 day for the following reason:\n\n> Too much spam!"
text = "Your account has been banned for **1 day** for the following reason:\n\n> Too much spam!"
send_repeatable_notification(v.id, text)
v.ban(reason="Spamming.",
@ -503,7 +503,7 @@ def api_comment(v):
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
text = "Your account has been banned 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)
@ -795,7 +795,7 @@ def edit_comment(cid, v):
threshold *= 2
if len(similar_comments) > threshold:
text = "Your account has been suspended for 1 day for the following reason:\n\n> Too much spam!"
text = "Your account has been banned for **1 day** for the following reason:\n\n> Too much spam!"
send_repeatable_notification(v.id, text)
v.ban(reason="Spamming.",
@ -885,7 +885,7 @@ def edit_comment(cid, v):
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
text = "Your account has been banned 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

@ -602,8 +602,8 @@ def edit_post(pid, v):
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
send_repeatable_notification(v.id, text)
text = "Your account has been banned 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)
g.db.add(n)
@ -1015,7 +1015,7 @@ def submit_post(v, sub=None):
if max(len(similar_urls), len(similar_posts)) >= threshold:
text = "Your account has been suspended for 1 day for the following reason:\n\n> Too much spam!"
text = "Your account has been banned for **1 day** for the following reason:\n\n> Too much spam!"
send_repeatable_notification(v.id, text)
v.ban(reason="Spamming.",
@ -1288,7 +1288,7 @@ def submit_post(v, sub=None):
v.ban(reason="White people nonsense.", days=0.007)
text = "Your account has been suspended for 10 minutes for the following reason:\n\n> Unsanctioned NWord"
text = "Your account has been banned 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)