disallow adding ppl as mods to house holes if they're not members of that house

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-21 18:02:01 +02:00
parent 82f6a34bde
commit 9dba3240c3
1 changed files with 3 additions and 0 deletions

View File

@ -241,6 +241,9 @@ def add_mod(v, sub):
user = get_user(user)
if sub in ('furry','vampire','racist','femboy') and not (user.house and user.house.lower().startswith(sub)):
return {"error": f"@{user.username} needs to be a member of House {sub.capitalize()} to be added as a mod there!"}
existing = g.db.query(Mod).filter_by(user_id=user.id, sub=sub).one_or_none()
if not existing: