forked from rDrama/rDrama
force some posts into countryclub
parent
3ec4c0af3e
commit
390bdd0a41
|
@ -566,6 +566,9 @@ def submit_post(v, hole=None):
|
||||||
ghost=flag_ghost,
|
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.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.queened = v.queen and not p.is_effortpost
|
||||||
p.sharpened = v.sharpen 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)
|
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!"}
|
return {"message": "Post edited successfully!"}
|
||||||
|
|
|
@ -150,12 +150,15 @@ def remove_report_comment(v, cid, uid):
|
||||||
return {"message": "Report removed successfully!"}
|
return {"message": "Report removed successfully!"}
|
||||||
|
|
||||||
def move_post(post, v, reason):
|
def move_post(post, v, reason):
|
||||||
if post.ghost:
|
|
||||||
return False
|
|
||||||
|
|
||||||
if not reason.startswith('/h/') and not reason.startswith('h/'):
|
if not reason.startswith('/h/') and not reason.startswith('h/'):
|
||||||
return False
|
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_from = post.hole
|
||||||
hole_to = get_hole(reason, graceful=True)
|
hole_to = get_hole(reason, graceful=True)
|
||||||
hole_to = hole_to.name if hole_to else None
|
hole_to = hole_to.name if hole_to else None
|
||||||
|
|
Loading…
Reference in New Issue