diff --git a/drama/routes/admin.py b/drama/routes/admin.py index 7757c1a4d..4b8b31ded 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -665,14 +665,14 @@ def ban_user(user_id, v): user.ban(admin=v, reason=reason) - - for x in user.alts: - if x.admin_level > 0: break - x.ban(admin=v, reason=reason) + if request.form.get("alts", ""): + for x in user.alts: + if x.admin_level > 0: break + x.ban(admin=v, reason=reason) send_notification(1046, user, text) - if days == 0: duration = "permenant" + if days == 0: duration = "permanent" elif days == 1: duration = "1 day" else: duration = f"{days} days" ma=ModAction( @@ -701,9 +701,10 @@ def unban_user(user_id, v): user.unban() - for x in user.alts: - if x.admin_level == 0: - x.unban() + if request.form.get("alts", ""): + for x in user.alts: + if x.admin_level == 0: + x.unban() send_notification(1046, user, "Your Drama account has been reinstated. Please carefully review and abide by the [rules](/post/2510) to ensure that you don't get suspended again.") diff --git a/drama/templates/userpage.html b/drama/templates/userpage.html index c35db5371..eb0930306 100644 --- a/drama/templates/userpage.html +++ b/drama/templates/userpage.html @@ -69,7 +69,7 @@
{% if u.is_suspended %}
BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}
- {% if unban %}
{{unban}}
{% endif %} +
{{u.unban_string}}
{% endif %}
@@ -184,7 +184,11 @@

 						{% if u.is_banned %}
 							
- + +
+ + +
{% else %} @@ -192,6 +196,10 @@ +
+ + +
{% endif %} @@ -284,7 +292,7 @@
{% if u.is_suspended %}
BANNED USER{% if u.ban_reason %}: {{u.ban_reason}}{% endif %}
- {% if unban %}
{{unban}}
{% endif %} +
{{u.unban_string}}
{% endif %}

{{u.username}}

@@ -366,6 +374,10 @@ {% if u.is_banned %}
+
+ + +
{% else %} @@ -373,6 +385,10 @@ +
+ + +
{% endif %}