forked from MarseyWorld/MarseyWorld
generate mod log item for removals
parent
e4734f4ec4
commit
e4d4c4798d
|
@ -413,8 +413,22 @@ def execute_blackjack(v, target, body, type):
|
||||||
|
|
||||||
v.ban_reason = "Blackjack"
|
v.ban_reason = "Blackjack"
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
elif hasattr(target, 'is_banned'):
|
elif type == 'submission':
|
||||||
target.is_banned = True
|
target.is_banned = True
|
||||||
|
ma = ModAction(
|
||||||
|
kind="ban_post",
|
||||||
|
user_id=AUTOJANNY_ID,
|
||||||
|
_note='reason: "Blackjack"'
|
||||||
|
)
|
||||||
|
g.db.add(ma)
|
||||||
|
elif type in ('comment', 'message', 'modmail'):
|
||||||
|
target.is_banned = True
|
||||||
|
ma = ModAction(
|
||||||
|
kind="ban_comment",
|
||||||
|
user_id=AUTOJANNY_ID,
|
||||||
|
_note='reason: "Blackjack"'
|
||||||
|
)
|
||||||
|
g.db.add(ma)
|
||||||
|
|
||||||
if type == 'submission':
|
if type == 'submission':
|
||||||
extra_info = target.permalink
|
extra_info = target.permalink
|
||||||
|
|
Loading…
Reference in New Issue