From 033e4dd35c9176f64ccaf6972304bf149569ded2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 10 Dec 2022 15:06:30 +0200 Subject: [PATCH] disable janny chudding in /h/chudrama --- files/routes/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index 0187d71c9..9fd05a49f 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1089,12 +1089,16 @@ def agendaposter(user_id, v): try: post = int(request.values["reason"].split("/post/")[1].split(None, 1)[0]) except: abort(400) post = get_post(post) + if post.sub == 'chudrama': + abort(403, "You can't chud people in /h/chudrama") post.chuddedfor = f'{duration} by @{v.username}' g.db.add(post) elif request.values["reason"].startswith("/comment/"): try: comment = int(request.values["reason"].split("/comment/")[1].split(None, 1)[0]) except: abort(400) comment = get_comment(comment) + if comment.post.sub == 'chudrama': + abort(403, "You can't chud people in /h/chudrama") comment.chuddedfor = f'{duration} by @{v.username}' g.db.add(comment)