forked from MarseyWorld/MarseyWorld
always shadow
parent
f5a97ae709
commit
fbd155e3c1
|
@ -194,25 +194,21 @@ def execute_blackjack(v, target, body, type):
|
||||||
for x in blackjack.split(','):
|
for x in blackjack.split(','):
|
||||||
if all(i in body.lower() for i in x.split()):
|
if all(i in body.lower() for i in x.split()):
|
||||||
execute = True
|
execute = True
|
||||||
shadowban = v.truescore < 100 or not target
|
|
||||||
|
|
||||||
if not execute: return False
|
if not execute: return False
|
||||||
|
|
||||||
if shadowban:
|
v.shadowbanned = AUTOJANNY_ID
|
||||||
v.shadowbanned = AUTOJANNY_ID
|
|
||||||
|
|
||||||
ma = ModAction(
|
ma = ModAction(
|
||||||
kind="shadowban",
|
kind="shadowban",
|
||||||
user_id=AUTOJANNY_ID,
|
user_id=AUTOJANNY_ID,
|
||||||
target_user_id=v.id,
|
target_user_id=v.id,
|
||||||
_note='reason: "Blackjack"'
|
_note='reason: "Blackjack"'
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
v.ban_reason = "Blackjack"
|
v.ban_reason = "Blackjack"
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
elif target and type in {'submission', 'comment', 'message'}:
|
|
||||||
target.is_banned = True
|
|
||||||
|
|
||||||
notified_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['BLACKJACK_NOTIFICATIONS'])]
|
notified_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['BLACKJACK_NOTIFICATIONS'])]
|
||||||
extra_info = type
|
extra_info = type
|
||||||
|
|
Loading…
Reference in New Issue