This commit is contained in:
Aevann1 2022-03-01 01:30:44 +02:00
parent 79dbfc8edd
commit bb3c2a3036
10 changed files with 48 additions and 151 deletions

View file

@ -398,13 +398,6 @@ def award_post(pid, v):
for c in post.comments:
c.ghost = True
g.db.add(c)
elif kind == "nword":
author.nwordpass = True
if not author.has_badge(108):
new_badge = Badge(badge_id=108, user_id=author.id)
g.db.add(new_badge)
g.db.flush()
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "rehab":
if author.rehab: author.rehab += 86400
else: author.rehab = int(time.time()) + 86400
@ -625,13 +618,6 @@ def award_comment(cid, v):
elif kind == "ghost":
c.ghost = True
g.db.add(c)
elif kind == "nword":
author.nwordpass = True
if not author.has_badge(108):
new_badge = Badge(badge_id=108, user_id=author.id)
g.db.add(new_badge)
g.db.flush()
send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
elif kind == "rehab":
if author.rehab: author.rehab += 86400
else: author.rehab = int(time.time()) + 86400