forked from rDrama/rDrama
1
0
Fork 0

force some posts into countryclub

master
Aevann 2023-11-04 18:16:23 +02:00
parent 3ec4c0af3e
commit 390bdd0a41
2 changed files with 12 additions and 3 deletions

View File

@ -566,6 +566,9 @@ def submit_post(v, hole=None):
ghost=flag_ghost,
)
if 'movie night' in p.title.lower() or 'movie night' in p.body.lower():
p.hole = 'countryclub'
p.chudded = v.chud and hole != 'chudrama' and not (p.is_effortpost and not v.chudded_by)
p.queened = v.queen and not p.is_effortpost
p.sharpened = v.sharpen and not p.is_effortpost
@ -1062,4 +1065,7 @@ def edit_post(pid, v):
)
g.db.add(ma)
if 'movie night' in p.title.lower() or 'movie night' in p.body.lower():
p.hole = 'countryclub'
return {"message": "Post edited successfully!"}

View File

@ -150,12 +150,15 @@ def remove_report_comment(v, cid, uid):
return {"message": "Report removed successfully!"}
def move_post(post, v, reason):
if post.ghost:
return False
if not reason.startswith('/h/') and not reason.startswith('h/'):
return False
if post.ghost:
abort(403, "You can't move ghost posts into holes!")
if 'movie night' in post.title.lower() or 'movie night' in post.body.lower():
abort(403, "You can't move this post out of /h/countryclub")
hole_from = post.hole
hole_to = get_hole(reason, graceful=True)
hole_to = hole_to.name if hole_to else None