boost effortposts and countryclub by 4

master
Aevann 2024-02-23 19:36:00 +02:00
parent 99bc93dd23
commit d76554278f
1 changed files with 3 additions and 4 deletions

View File

@ -159,6 +159,8 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
send_notification(AEVANN_ID, target.permalink)
elif SITE == 'rdrama.net' and target.author_id == 29:
mul = 4
elif cls == Post and (target.effortpost or target.hole == 'countryclub'):
mul = 4
elif target.author.progressivestack or (IS_HOMOWEEN() and target.author.zombie < 0) or target.author.admin_level >= PERMS['IS_PERMA_PROGSTACKED']:
mul = 2
elif SITE == 'rdrama.net' and target.author.new_user and not target.author.alts:
@ -170,7 +172,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
or any(i in target.domain for i in ('forum','community','chan','lemmy','mastodon')) \
or (target.domain in BOOSTED_SITES and not target.url.startswith('/')):
mul = 2
elif target.hole in STEALTH_HOLES or target.hole in {'countryclub', 'highrollerclub'}:
elif target.hole in STEALTH_HOLES | {'highrollerclub'}:
mul = 2
elif target.hole in BOOSTED_HOLES:
mul = 1.25
@ -181,9 +183,6 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
target.realupvotes += min(x*2, 20)
mul += min(x/10, 1)
if cls == Post and (target.effortpost or target.hole == 'countryclub'):
mul *= 2
target.realupvotes = floor(target.realupvotes * mul)
g.db.add(target)