unlock chudrama automatically for ppl banned for >9 years

master
Aevann 2024-08-28 15:16:57 +03:00
parent a086d96a9b
commit fe27ff68ca
1 changed files with 3 additions and 1 deletions

View File

@ -502,7 +502,9 @@ class User(Base):
def hole_blocks(self):
stealth = {x[0] for x in g.db.query(Hole.name).filter_by(stealth=True)}
stealth = stealth - {x[0] for x in g.db.query(StealthHoleUnblock.hole).filter_by(user_id=self.id)}
if self.chud == 1: stealth = stealth - {'chudrama'}
if self.chud == 1 or self.unban_utc > 2000000000:
stealth = stealth - {'chudrama'}
public_use = {x[0] for x in g.db.query(Hole.name).filter_by(public_use=True)}