pull/83/head
Aevann 2022-12-27 06:32:53 +02:00
parent f97be253e7
commit 84bff9cb44
1 changed files with 4 additions and 1 deletions

View File

@ -1020,11 +1020,12 @@ def ban_user(user_id, v):
pass
reason = request.values.get("reason").strip()[:256]
reason = filter_emojis_only(reason)
if reason.startswith("/") and '\\' not in reason:
reason = f'<a href="{reason.split()[0]}">{reason}</a>'
reason = filter_emojis_only(reason)
user.ban(admin=v, reason=reason, days=days)
if request.values.get("alts"):
@ -1091,6 +1092,8 @@ def agendaposter(user_id, v):
if reason and reason.startswith("/") and '\\' not in reason:
reason = f'<a href="{reason.split()[0]}">{reason}</a>'
reason = filter_emojis_only(reason)
duration = "permanently"
if days:
user.agendaposter = int(time.time()) + (days * 86400)