forked from rDrama/rDrama
master
parent
2dd3a66cb9
commit
c4a4a21326
|
@ -317,22 +317,22 @@ def award_comment(cid, v):
|
||||||
send_notification(NOTIFICATIONS_ACCOUNT, c.author, msg)
|
send_notification(NOTIFICATIONS_ACCOUNT, c.author, msg)
|
||||||
|
|
||||||
if kind == "ban":
|
if kind == "ban":
|
||||||
author = comment.author
|
author = c.author
|
||||||
link = f"[this comment]({comment.permalink})"
|
link = f"[this comment]({c.permalink})"
|
||||||
|
|
||||||
if not author.is_suspended:
|
if not author.is_suspended:
|
||||||
author.ban(reason=f"one-day ban award used by @{v.username} on /comment/{comment.id}", days=1)
|
author.ban(reason=f"one-day ban award used by @{v.username} on /comment/{c.id}", days=1)
|
||||||
send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for a day for {link}. It sucked and you should feel bad.")
|
send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for a day for {link}. It sucked and you should feel bad.")
|
||||||
elif author.unban_utc > 0:
|
elif author.unban_utc > 0:
|
||||||
author.unban_utc += 24*60*60
|
author.unban_utc += 24*60*60
|
||||||
g.db.add(author)
|
g.db.add(author)
|
||||||
send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for yet another day for {link}. Seriously man?")
|
send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for yet another day for {link}. Seriously man?")
|
||||||
elif kind == "grass":
|
elif kind == "grass":
|
||||||
author = comment.author
|
author = c.author
|
||||||
author.is_banned = AUTOJANNY_ACCOUNT
|
author.is_banned = AUTOJANNY_ACCOUNT
|
||||||
author.ban_reason = f"grass award used by @{v.username} on /comment/{comment.id}"
|
author.ban_reason = f"grass award used by @{v.username} on /comment/{c.id}"
|
||||||
g.db.add(author)
|
g.db.add(author)
|
||||||
link = f"[this comment]({comment.permalink})"
|
link = f"[this comment]({c.permalink})"
|
||||||
send_notification(NOTIFICATIONS_ACCOUNT, author, 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_notification(NOTIFICATIONS_ACCOUNT, author, 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!")
|
||||||
|
|
||||||
c.author.received_award_count += 1
|
c.author.received_award_count += 1
|
||||||
|
|
Loading…
Reference in New Issue