disallow ppl giving chud award in /h/chudrama

master
Aevann1 2022-12-11 18:22:44 +02:00
parent a60a73aef2
commit 49ac549651
1 changed files with 4 additions and 0 deletions

View File

@ -266,6 +266,10 @@ def award_thing(v, thing_type, id):
else: thing.stickied_utc = t else: thing.stickied_utc = t
g.db.add(thing) g.db.add(thing)
elif kind == "agendaposter": elif kind == "agendaposter":
if thing_type == 'post' and thing.sub == 'chudrama' \
or thing_type == 'comment' and thing.post.sub == 'chudrama':
abort(403, "You can't give the chud award in /h/chudrama")
if author.marseyawarded: if author.marseyawarded:
abort(409, f"@{author.username} is under the effect of a conflicting award: Marsey award.") abort(409, f"@{author.username} is under the effect of a conflicting award: Marsey award.")