This commit is contained in:
Aevann1 2021-08-22 22:31:12 +02:00
parent fec6a7ada8
commit f0a9947e00
6 changed files with 17 additions and 18 deletions

View file

@ -12,16 +12,15 @@ def banaward_trigger(post=None, comment=None):
author = post.author if post else comment.author
link = f"[this post]({post.permalink})" if post else f"[this comment]({comment.permalink})"
if author.admin_level < 1:
if not author.is_suspended:
author.ban(reason="one-day ban award used", days=1)
if not author.is_suspended:
author.ban(reason="one-day ban award used", 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.")
elif author.unban_utc > 0:
author.unban_utc += 24*60*60
g.db.add(author)
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:
author.unban_utc += 24*60*60
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?")
ACTIONS = {