disallow adding ppl as mods to house holes if they're not members of that house
parent
82f6a34bde
commit
9dba3240c3
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue