allow me to ban (((🐟)))

master
Aevann1 2022-10-11 15:48:49 +02:00
parent 490debb293
commit 8032b9d5a4
1 changed files with 4 additions and 2 deletions

View File

@ -997,7 +997,8 @@ def admin_title_change(user_id, v):
def ban_user(user_id, v): def ban_user(user_id, v):
user = get_account(user_id) user = get_account(user_id)
if user.admin_level >= v.admin_level: abort(403) if user.admin_level > v.admin_level:
abort(403)
days = float(request.values.get("days")) if request.values.get('days') else 0 days = float(request.values.get("days")) if request.values.get('days') else 0
@ -1011,7 +1012,8 @@ def ban_user(user_id, v):
if request.values.get("alts"): if request.values.get("alts"):
for x in user.alts: for x in user.alts:
if x.admin_level: break if x.admin_level > v.admin_level:
continue
x.ban(admin=v, reason=reason, days=days) x.ban(admin=v, reason=reason, days=days)
if days: if days: