protect effortposts from the ectoplasm award

master
Aevann 2023-10-15 16:58:00 +03:00
parent c84f6895cb
commit 518f12bbd3
1 changed files with 3 additions and 0 deletions

View File

@ -537,6 +537,9 @@ def award_thing(v, thing_type, id):
badge_grant(badge_id=185, user=author) badge_grant(badge_id=185, user=author)
if v.id == author.id: if v.id == author.id:
session['event_music'] = False session['event_music'] = False
elif kind == "ectoplasm":
if thing.is_effortpost:
abort(404, 'Effortposts are protected from the Ectoplasm award!')
elif kind == "spider": elif kind == "spider":
if author.spider: author.spider += 86400 if author.spider: author.spider += 86400
else: author.spider = int(time.time()) + 86400 else: author.spider = int(time.time()) + 86400