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