From e68c2efb1b17bc25970c865cd622f22a54fc8cca Mon Sep 17 00:00:00 2001 From: scitzocel <98491720+scitzocel@users.noreply.github.com> Date: Fri, 5 Aug 2022 05:52:03 -0400 Subject: [PATCH] sneed (#328) * sneed * schizosneed soren * Update posts.py --- files/routes/posts.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/files/routes/posts.py b/files/routes/posts.py index ffed8a5cf..66e4ab6b7 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1041,6 +1041,19 @@ def submit_post(v, sub=None): g.db.add(v) post.upvotes += 3 g.db.add(post) + + if v.id == SOREN_ID: + autovote = Vote( + user_id=SCHIZO_ID, + submission_id=post.id, + vote_type=-1 + ) + g.db.add(autovote) + v.coins += 1 + v.truecoins += 1 + g.db.add(v) + post.downvotes += 1 + g.db.add(post) if SITE == 'rdrama.net' and post.sub and post.sub not in ('dankchristianmemes','fatpeoplehate','braincels','truth') and v.id != AEVANN_ID: g.db.flush() @@ -1056,6 +1069,21 @@ def submit_post(v, sub=None): g.db.add(v) post.upvotes += 1 g.db.add(post) + + if SITE == 'rdrama.net' and post.sub and post.sub in ('stupidpol') and v.id not in (SOREN_ID, SCHIZO_ID): + g.db.flush() + autovote = Vote( + user_id=SCHIZO_ID, + submission_id=post.id, + vote_type=1 + ) + autovote.created_utc += 1 + g.db.add(autovote) + v.coins += 1 + v.truecoins += 1 + g.db.add(v) + post.upvotes += 1 + g.db.add(post) cache.delete_memoized(frontlist) cache.delete_memoized(User.userpagelisting)