forked from rDrama/rDrama
boost informative holes with 3 extra autoupvotes
parent
f7356c0843
commit
c70ea0eb64
|
@ -1070,19 +1070,6 @@ def submit_post(v, sub=None):
|
||||||
post.upvotes += 3
|
post.upvotes += 3
|
||||||
g.db.add(post)
|
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:
|
if SITE == 'rdrama.net' and post.sub and post.sub not in ('dankchristianmemes','fatpeoplehate','foid','truth') and v.id != AEVANN_ID:
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
autovote = Vote(
|
autovote = Vote(
|
||||||
|
@ -1098,34 +1085,24 @@ def submit_post(v, sub=None):
|
||||||
post.upvotes += 1
|
post.upvotes += 1
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
||||||
if SITE == 'rdrama.net' and post.sub == 'stupidpol' and v.id not in (SOREN_ID, SCHIZO_ID):
|
upvoters = (CARP_ID, 8094, 10881)
|
||||||
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:
|
if SITE == 'rdrama.net' and post.sub in ('slackernews','space','istory','dinos') and v.id not in upvoters:
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
|
for user_id in upvoters:
|
||||||
autovote = Vote(
|
autovote = Vote(
|
||||||
user_id=CARP_ID,
|
user_id=user_id,
|
||||||
submission_id=post.id,
|
submission_id=post.id,
|
||||||
vote_type=1
|
vote_type=1
|
||||||
)
|
)
|
||||||
autovote.created_utc += 1
|
autovote.created_utc += 1
|
||||||
g.db.add(autovote)
|
g.db.add(autovote)
|
||||||
v.coins += 1
|
|
||||||
v.truecoins += 1
|
v.coins += 3
|
||||||
|
v.truecoins += 3
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
post.upvotes += 1
|
post.upvotes += 3
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
|
|
Loading…
Reference in New Issue