N
This commit is contained in:
parent
79dbfc8edd
commit
bb3c2a3036
10 changed files with 48 additions and 151 deletions
|
@ -243,7 +243,7 @@ def api_comment(v):
|
|||
copyfile(oldname, filename)
|
||||
process_image(filename, 400)
|
||||
elif parent_post.id == 37697:
|
||||
filename = 'files/assets/images/Drama/banners_bhm/' + str(len(listdir('files/assets/images/Drama/banners_bhm'))+1) + '.webp'
|
||||
filename = 'files/assets/images/Drama/banners/' + str(len(listdir('files/assets/images/Drama/banners'))+1) + '.webp'
|
||||
copyfile(oldname, filename)
|
||||
process_image(filename)
|
||||
elif parent_post.id == 37833:
|
||||
|
@ -480,35 +480,8 @@ def api_comment(v):
|
|||
|
||||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
|
||||
elif SITE_NAME == 'Drama' and 'nigg' in c.body.lower() and not v.nwordpass:
|
||||
|
||||
c.is_banned = True
|
||||
c.ban_reason = "AutoJanny"
|
||||
g.db.add(c)
|
||||
|
||||
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
|
||||
parent_submission=parent_submission,
|
||||
distinguish_level=6,
|
||||
parent_comment_id=c.id,
|
||||
level=level+1,
|
||||
is_bot=True,
|
||||
body_html=no_pass_phrase,
|
||||
top_comment_id=c.top_comment_id,
|
||||
ghost=parent_post.ghost
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
g.db.flush()
|
||||
|
||||
v.ban(reason="White people nonsense.", days=0.007)
|
||||
|
||||
text = "Your account has been banned for **10 minutes** for the following reason:\n\n> Unsanctioned NWord"
|
||||
send_repeatable_notification(v.id, text)
|
||||
|
||||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
|
||||
if SITE_NAME == 'Drama' and len(c.body) >= 1000 and "<" not in body and "</blockquote>" not in body_html:
|
||||
|
||||
body = random.choice(LONGPOST_REPLIES)
|
||||
|
@ -859,33 +832,6 @@ def edit_comment(cid, v):
|
|||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
|
||||
elif SITE_NAME == 'Drama' and 'nigg' in c.body.lower() and not v.nwordpass:
|
||||
|
||||
c.is_banned = True
|
||||
c.ban_reason = "AutoJanny"
|
||||
g.db.add(c)
|
||||
|
||||
c_jannied = Comment(author_id=NOTIFICATIONS_ID,
|
||||
parent_submission=c.parent_submission,
|
||||
distinguish_level=6,
|
||||
parent_comment_id=c.id,
|
||||
level=c.level+1,
|
||||
is_bot=True,
|
||||
body_html=no_pass_phrase,
|
||||
top_comment_id=c.top_comment_id,
|
||||
ghost=c.ghost
|
||||
)
|
||||
|
||||
g.db.add(c_jannied)
|
||||
g.db.flush()
|
||||
|
||||
v.ban(reason="White people nonsense.", days=0.007)
|
||||
|
||||
text = "Your account has been banned for **10 minutes** for the following reason:\n\n> Unsanctioned NWord"
|
||||
send_repeatable_notification(v.id, text)
|
||||
|
||||
n = Notification(comment_id=c_jannied.id, user_id=v.id)
|
||||
g.db.add(n)
|
||||
|
||||
|
||||
if int(time.time()) - c.created_utc > 60 * 3: c.edited_utc = int(time.time())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue