forked from rDrama/rDrama
1
0
Fork 0

fix vamp bug

master
Aevann 2023-04-23 04:42:25 +02:00
parent bde73fc665
commit 064918acd0
2 changed files with 11 additions and 11 deletions

View File

@ -70,11 +70,10 @@ def award_timers(v, bot=False):
v.bite = None v.bite = None
badge = v.has_badge(168) badge = v.has_badge(168)
if badge: g.db.delete(badge) if badge: g.db.delete(badge)
if "Vampire" not in v.old_house: v.house = v.old_house
v.house = v.old_house notify_if_not_bot(f"Your vampire status has ended. You're now back in House {v.old_house.replace(' Founder', '')}!")
v.old_house = '' v.old_house = ''
notify_if_not_bot(f"Your vampire status has ended. You're now back in House {v.old_house.replace(' Founder', '')}!")
if v.earlylife and v.earlylife < now: if v.earlylife and v.earlylife < now:
v.earlylife = None v.earlylife = None

View File

@ -409,12 +409,13 @@ def award_thing(v, thing_type, id):
g.db.add(thing) g.db.add(thing)
elif "Vampire" in kind and kind == v.house: elif "Vampire" in kind and kind == v.house:
if author.bite: author.bite += 172800 if author.bite: author.bite += 172800
else: author.bite = int(time.time()) + 172800 else:
if v.house.startswith("Vampire"):
if 'Vampire' not in author.house: abort(400, f"{safe_username} is already a permanent vampire!")
if not author.old_house:
author.old_house = author.house author.bite = int(time.time()) + 172800
author.house = 'Vampire' v.old_house = v.house
v.house = "Vampire"
badge_grant(user=author, badge_id=168) badge_grant(user=author, badge_id=168)
elif "Racist" in kind and kind == v.house: elif "Racist" in kind and kind == v.house: