show under siege reason in shadowban reason

master
Aevann 2024-10-20 18:24:57 +03:00
parent cdc8cd7a3e
commit cb4e8387fb
1 changed files with 11 additions and 7 deletions

View File

@ -538,10 +538,6 @@ def execute_under_siege(v, target, kind):
check_for_alts(v) check_for_alts(v)
if v.shadowbanned: return if v.shadowbanned: return
v.shadowbanned = AUTOJANNY_ID
v.shadowban_reason = "Under Siege"
g.db.add(v)
if kind == "report": if kind == "report":
if isinstance(target, Post): if isinstance(target, Post):
reason = f'report on <a href="{target.permalink}">post</a>' reason = f'report on <a href="{target.permalink}">post</a>'
@ -555,6 +551,10 @@ def execute_under_siege(v, target, kind):
if minutes > 1: if minutes > 1:
time_taken += 's' time_taken += 's'
v.shadowbanned = AUTOJANNY_ID
v.shadowban_reason = f"Under Siege ({reason}, {time_taken})"
g.db.add(v)
ma = ModAction( ma = ModAction(
kind="shadowban", kind="shadowban",
user_id=AUTOJANNY_ID, user_id=AUTOJANNY_ID,
@ -575,9 +575,13 @@ def check_name(v):
) )
g.db.add(ma) g.db.add(ma)
elif any(x in v.username.lower() for x in ('nigger', 'faggot', 'kike', 'trann', '1488')): elif any(x in v.username.lower() for x in ('nigger', 'faggot', 'kike', 'trann', '1488')):
v.is_banned = AUTOJANNY_ID userban = UserBan(
v.unban_utc = 32500915200 user_id=v.id,
v.ban_reason = "Name" original_user_id=v.id,
admin_id=AUTOJANNY_ID,
unban_utc=32500915200,
ban_reason="Name",
)
ma = ModAction( ma = ModAction(
kind="ban_user", kind="ban_user",
user_id=AUTOJANNY_ID, user_id=AUTOJANNY_ID,