forked from MarseyWorld/MarseyWorld
fds
parent
68add1eb36
commit
d026174472
|
@ -393,7 +393,7 @@ def api_comment(v):
|
|||
g.db.add(c)
|
||||
g.db.flush()
|
||||
|
||||
if blackjack and blackjack in c.body.lower():
|
||||
if blackjack and any(i in c.body.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
notif = Notification(comment_id=c.id, user_id=CARP_ID)
|
||||
g.db.add(notif)
|
||||
|
@ -792,7 +792,7 @@ def edit_comment(cid, v):
|
|||
c.body = body[:10000]
|
||||
c.body_html = body_html
|
||||
|
||||
if blackjack and blackjack in c.body.lower():
|
||||
if blackjack and any(i in c.body.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
g.db.add(v)
|
||||
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=CARP_ID).one_or_none()
|
||||
|
|
|
@ -512,7 +512,7 @@ def edit_post(pid, v):
|
|||
|
||||
p.body = body
|
||||
|
||||
if blackjack and blackjack in f'{p.body} {p.title} {p.url}'.lower():
|
||||
if blackjack and any(i in f'{p.body} {p.title} {p.url}'.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
g.db.add(v)
|
||||
send_repeatable_notification(CARP_ID, p.permalink)
|
||||
|
@ -1137,7 +1137,7 @@ def submit_post(v, sub=None):
|
|||
g.db.add(post)
|
||||
g.db.flush()
|
||||
|
||||
if blackjack and blackjack in f'{post.body} {post.title} {post.url}'.lower():
|
||||
if blackjack and any(i in f'{post.body} {post.title} {post.url}'.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
g.db.add(v)
|
||||
send_repeatable_notification(CARP_ID, post.permalink)
|
||||
|
|
|
@ -14,7 +14,7 @@ def api_flag_post(pid, v):
|
|||
|
||||
reason = request.values.get("reason", "").strip()
|
||||
|
||||
if blackjack and blackjack in reason.lower():
|
||||
if blackjack and any(i in reason.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
send_repeatable_notification(CARP_ID, f"reports on {post.permalink}")
|
||||
|
||||
|
@ -68,7 +68,7 @@ def api_flag_comment(cid, v):
|
|||
|
||||
reason = request.values.get("reason", "").strip()
|
||||
|
||||
if blackjack and blackjack in reason.lower():
|
||||
if blackjack and any(i in reason.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
send_repeatable_notification(CARP_ID, f"reports on {comment.permalink}")
|
||||
|
||||
|
|
|
@ -625,7 +625,7 @@ def message2(v, username):
|
|||
|
||||
g.db.flush()
|
||||
|
||||
if blackjack and blackjack in c.body_html.lower():
|
||||
if blackjack and any(i in c.body_html.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
g.db.add(v)
|
||||
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=CARP_ID).one_or_none()
|
||||
|
@ -703,7 +703,7 @@ def messagereply(v):
|
|||
g.db.add(c)
|
||||
g.db.flush()
|
||||
|
||||
if blackjack and blackjack in c.body_html.lower():
|
||||
if blackjack and any(i in c.body_html.lower() for i in blackjack.split()):
|
||||
v.shadowbanned = 'AutoJanny'
|
||||
g.db.add(v)
|
||||
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=CARP_ID).one_or_none()
|
||||
|
|
Loading…
Reference in New Issue