remove "alts" checkbox for shadowbanning since shadowbans propagate anway via check_for_alts()

pull/2/head
Aevann1 2022-11-22 17:44:16 +02:00
parent b0ff8916a5
commit 0b1f166211
2 changed files with 0 additions and 11 deletions

View File

@ -881,13 +881,6 @@ def shadowban(user_id, v):
user.ban_reason = reason
g.db.add(user)
if request.values.get("alts"):
for alt in user.alts:
if alt.admin_level: continue
alt.shadowbanned = v.username
alt.ban_reason = reason
g.db.add(alt)
ma = ModAction(
kind="shadowban",
user_id=v.id,

View File

@ -61,10 +61,6 @@
<form id="shadowban-{{deviceType}}" class="my-3 {% if u.shadowbanned %}d-none{% endif %}" action="/shadowban/{{u.id}}" method="post" onsubmit="sendFormXHRSwitch(event)">
<input type="hidden" name="formkey" value="{{v|formkey}}">
<input autocomplete="off" style="font-size:11px" type="text" class="form-control" maxlength="256" name="reason" placeholder="Shadowban Reason" oninput="document.getElementById('user-shadowban-submit-{{deviceType}}').disabled=false" required>
<div class="custom-control custom-checkbox mb-1">
<input autocomplete="off" type="checkbox" id="shadowban-alts-{{deviceType}}" class="custom-control-input" name="alts" value="1">
<label class="custom-control-label" for="shadowban-alts-{{deviceType}}">Include alts</label>
</div>
<input autocomplete="off" id="user-shadowban-submit-{{deviceType}}" type="submit" onclick="disable(this)" class="btn btn-danger" value="Shadowban user" disabled>
</form>
{% endif %}