diff --git a/files/classes/user.py b/files/classes/user.py index 798717bb7c..6b09055353 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -662,7 +662,8 @@ class User(Base): elif self.discord_id: remove_user(self) self.is_banned = admin.id if admin else AUTOJANNY_ID - if reason: self.ban_reason = reason + if reason and len(reason) <= 256: + self.ban_reason = reason diff --git a/files/routes/admin.py b/files/routes/admin.py index 68e4c8826f..c58de5455a 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1009,8 +1009,6 @@ def ban_user(user_id, v): if reason.startswith("/") and '\\' not in reason: reason = f'{reason}' - if len(reason) > 256: reason = reason - user.ban(admin=v, reason=reason, days=days) if request.values.get("alts"): diff --git a/files/templates/ban_modal.html b/files/templates/ban_modal.html index a5a9860cba..ce4b9ba937 100644 --- a/files/templates/ban_modal.html +++ b/files/templates/ban_modal.html @@ -15,7 +15,7 @@ - + diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 65727fef00..dde645b45f 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -290,7 +290,7 @@
- +
@@ -624,7 +624,7 @@ - +