bbbbbbbbbbbbbbbbbbbbbbb

master
Aevann1 2022-01-14 13:53:38 +02:00
parent c5dad2639e
commit 4a09df7fb8
3 changed files with 19 additions and 8 deletions

View File

@ -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

View File

@ -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()

View File

@ -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()