forked from rDrama/rDrama
make "bird" cancel "pizzashill" effect and vice versa
parent
55f4a9fa03
commit
bed1ff0bac
|
@ -438,13 +438,19 @@ def award_thing(v, thing_type, id):
|
|||
badge_grant(user=author, badge_id=98)
|
||||
elif kind == "pizzashill":
|
||||
if author.bird:
|
||||
abort(409, f"{safe_username} under the effect of a conflicting award: Bird Site award!")
|
||||
author.bird = 0
|
||||
badge = author.has_badge(95)
|
||||
if badge: g.db.delete(badge)
|
||||
else:
|
||||
if author.longpost: author.longpost += 86400
|
||||
else: author.longpost = int(time.time()) + 86400
|
||||
badge_grant(user=author, badge_id=97)
|
||||
elif kind == "bird":
|
||||
if author.longpost:
|
||||
abort(409, f"{safe_username} under the effect of a conflicting award: Pizzashill award!")
|
||||
author.longpost = 0
|
||||
badge = author.has_badge(97)
|
||||
if badge: g.db.delete(badge)
|
||||
else:
|
||||
if author.bird: author.bird += 86400
|
||||
else: author.bird = int(time.time()) + 86400
|
||||
badge_grant(user=author, badge_id=95)
|
||||
|
|
Loading…
Reference in New Issue