From 4a09df7fb8d7a1654934a4a32144b37cf9ce87d2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 14 Jan 2022 13:53:38 +0200 Subject: [PATCH] bbbbbbbbbbbbbbbbbbbbbbb --- files/helpers/const.py | 3 +++ files/routes/comments.py | 12 ++++++++---- files/routes/posts.py | 12 ++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index de551a508..b4d8ac937 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -142,6 +142,7 @@ if SITE == 'rdrama.net': AUTOBETTER_ID = 7668 TAX_RECEIVER_ID = 995 AUTO_UPVOTE_IDS = (2424,4245) + CRAT_ID = 747 IDIO_ID = 30 CARP_ID = 995 JOAN_ID = 28 @@ -167,6 +168,7 @@ elif SITE == "pcmemes.net": AUTOBETTER_ID = 1867 TAX_RECEIVER_ID = 1592 AUTO_UPVOTE_IDS = () + CRAT_ID = 0 IDIO_ID = 0 CARP_ID = 0 JOAN_ID = 0 @@ -192,6 +194,7 @@ else: AUTOBETTER_ID = 7 TAX_RECEIVER_ID = 8 AUTO_UPVOTE_IDS = () + CRAT_ID = 0 IDIO_ID = 0 CARP_ID = 0 JOAN_ID = 0 diff --git a/files/routes/comments.py b/files/routes/comments.py index 9ec177813..28868d95c 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -507,12 +507,16 @@ def api_comment(v): c.voted = 1 if v.id in AUTO_UPVOTE_IDS: - autovote = CommentVote(user_id=TAX_RECEIVER_ID, comment_id=c.id, vote_type=1) + autovote = CommentVote(user_id=CARP_ID, comment_id=c.id, vote_type=1) g.db.add(autovote) - v.coins += 1 - v.truecoins += 1 + autovote = CommentVote(user_id=AEVANN_ID, comment_id=c.id, vote_type=1) + g.db.add(autovote) + autovote = CommentVote(user_id=CRAT_ID, comment_id=c.id, vote_type=1) + g.db.add(autovote) + v.coins += 3 + v.truecoins += 3 g.db.add(v) - c.upvotes += 1 + c.upvotes += 3 g.db.add(c) g.db.commit() diff --git a/files/routes/posts.py b/files/routes/posts.py index 62e61ea6d..aedccd684 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1133,12 +1133,16 @@ def submit_post(v): cache.delete_memoized(changeloglist) if v.id in AUTO_UPVOTE_IDS: - autovote = Vote(user_id=TAX_RECEIVER_ID, submission_id=new_post.id, vote_type=1) + autovote = Vote(user_id=CARP_ID, submission_id=new_post.id, vote_type=1) g.db.add(autovote) - v.coins += 1 - v.truecoins += 1 + autovote = Vote(user_id=AEVANN_ID, submission_id=new_post.id, vote_type=1) + g.db.add(autovote) + autovote = Vote(user_id=CRAT_ID, submission_id=new_post.id, vote_type=1) + g.db.add(autovote) + v.coins += 3 + v.truecoins += 3 g.db.add(v) - new_post.upvotes += 1 + new_post.upvotes += 3 g.db.add(new_post) g.db.commit()