forked from rDrama/rDrama
overwrite ban reason
parent
ed5bbc43fa
commit
cafe3c47d3
|
@ -386,7 +386,7 @@ def execute_blackjack(v, target, body, type):
|
||||||
if not blackjack or not body: return True
|
if not blackjack or not body: return True
|
||||||
if any(i in body.lower() for i in blackjack.split()):
|
if any(i in body.lower() for i in blackjack.split()):
|
||||||
v.shadowbanned = AUTOJANNY_ID
|
v.shadowbanned = AUTOJANNY_ID
|
||||||
if not v.is_banned: v.ban_reason = f"Blackjack"
|
v.ban_reason = f"Blackjack"
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
notif = None
|
notif = None
|
||||||
extra_info = "unknown entity"
|
extra_info = "unknown entity"
|
||||||
|
@ -469,7 +469,8 @@ def execute_under_siege(v:User, target:Optional[Union[Submission, Comment]], bod
|
||||||
if not get_setting("under_siege"): return True
|
if not get_setting("under_siege"): return True
|
||||||
if v.age < UNDER_SIEGE_AGE_THRESHOLD and not v.admin_level >= PERMS['SITE_BYPASS_UNDER_SIEGE_MODE']:
|
if v.age < UNDER_SIEGE_AGE_THRESHOLD and not v.admin_level >= PERMS['SITE_BYPASS_UNDER_SIEGE_MODE']:
|
||||||
v.shadowbanned = AUTOJANNY_ID
|
v.shadowbanned = AUTOJANNY_ID
|
||||||
if not v.is_banned: v.ban_reason = f"Under Siege"
|
|
||||||
|
v.ban_reason = f"Under Siege"
|
||||||
v.is_muted = True
|
v.is_muted = True
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
t = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.time()))
|
t = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.time()))
|
||||||
|
|
|
@ -72,11 +72,11 @@ def check_for_alts(current:User, include_current_session=True):
|
||||||
if u._alt_deleted: continue
|
if u._alt_deleted: continue
|
||||||
if u.shadowbanned:
|
if u.shadowbanned:
|
||||||
current.shadowbanned = u.shadowbanned
|
current.shadowbanned = u.shadowbanned
|
||||||
if not current.is_banned: current.ban_reason = u.ban_reason
|
current.ban_reason = u.ban_reason
|
||||||
g.db.add(current)
|
g.db.add(current)
|
||||||
elif current.shadowbanned:
|
elif current.shadowbanned:
|
||||||
u.shadowbanned = current.shadowbanned
|
u.shadowbanned = current.shadowbanned
|
||||||
if not u.is_banned: u.ban_reason = current.ban_reason
|
u.ban_reason = current.ban_reason
|
||||||
g.db.add(u)
|
g.db.add(u)
|
||||||
|
|
||||||
def execute_shadowban_viewers_and_voters(v:Optional[User], target:Union[Submission, Comment]):
|
def execute_shadowban_viewers_and_voters(v:Optional[User], target:Union[Submission, Comment]):
|
||||||
|
|
Loading…
Reference in New Issue