boost informative holes with 3 extra autoupvotes

master
Aevann1 2022-08-21 19:14:03 +02:00
parent f7356c0843
commit c70ea0eb64
1 changed files with 16 additions and 39 deletions

View File

@ -1069,19 +1069,6 @@ 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','foid','truth') and v.id != AEVANN_ID:
g.db.flush()
@ -1097,35 +1084,25 @@ def submit_post(v, sub=None):
g.db.add(v)
post.upvotes += 1
g.db.add(post)
if SITE == 'rdrama.net' and post.sub == '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)
if SITE == 'rdrama.net' and post.sub == 'foid' and v.id != CARP_ID:
upvoters = (CARP_ID, 8094, 10881)
if SITE == 'rdrama.net' and post.sub in ('slackernews','space','istory','dinos') and v.id not in upvoters:
g.db.flush()
autovote = Vote(
user_id=CARP_ID,
submission_id=post.id,
vote_type=1
)
autovote.created_utc += 1
g.db.add(autovote)
v.coins += 1
v.truecoins += 1
for user_id in upvoters:
autovote = Vote(
user_id=user_id,
submission_id=post.id,
vote_type=1
)
autovote.created_utc += 1
g.db.add(autovote)
v.coins += 3
v.truecoins += 3
g.db.add(v)
post.upvotes += 1
post.upvotes += 3
g.db.add(post)
cache.delete_memoized(frontlist)