From 8032b9d5a45eeb3d10a8ccac4e72ce6468a3dbbc Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 11 Oct 2022 15:48:49 +0200 Subject: [PATCH] =?UTF-8?q?allow=20me=20to=20ban=20(((=F0=9F=90=9F)))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/routes/admin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index c70dbd17a..401d0bd89 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -997,7 +997,8 @@ def admin_title_change(user_id, v): def ban_user(user_id, v): 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 @@ -1011,7 +1012,8 @@ def ban_user(user_id, v): if request.values.get("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) if days: