prevent ppl from wasting their chud awards

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-29 23:34:34 +02:00
parent 3ac5fad2d8
commit d9ef62b9c6
1 changed files with 4 additions and 1 deletions

View File

@ -246,10 +246,13 @@ def award_thing(v, thing_type, id):
cache.delete_memoized(frontlist)
else: thing.stickied_utc = t
g.db.add(thing)
elif kind == "agendaposter" and not (author.agendaposter and author.agendaposter == 0):
elif kind == "agendaposter":
if author.marseyawarded:
abort(409, "This user is under the effect of a conflicting award: Marsey award.")
if author.agendaposter and author.agendaposter == 0:
abort(409, "This user is perma-chudded.")
if author.agendaposter and time.time() < author.agendaposter: author.agendaposter += 86400
else: author.agendaposter = int(time.time()) + 86400