From 1496b12e8f13c12f0c9f0bf3bae6ce32bc699594 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 25 Jan 2023 12:57:50 +0200 Subject: [PATCH] add progstack awawrd to WPD --- files/helpers/config/awards.py | 2 +- files/routes/votes.py | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py index 4011f9021..42dcf8216 100644 --- a/files/helpers/config/awards.py +++ b/files/helpers/config/awards.py @@ -537,7 +537,7 @@ AWARDS = { "deflectable": True, "cosmetic": False, "ghost": False, - "enabled": SITE_NAME == 'rDrama', + "enabled": True, }, "pizzashill": { "kind": "pizzashill", diff --git a/files/routes/votes.py b/files/routes/votes.py index 13be19078..ab23c3472 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -167,19 +167,18 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): mul = 1 if target.is_approved == PROGSTACK_ID: mul = PROGSTACK_MUL - elif SITE_NAME == 'rDrama': - if target.author.progressivestack or (target.author.admin_level and target.author.id not in {AEVANN_ID, CARP_ID}): + elif target.author.progressivestack or (target.author.admin_level and target.author.id not in {AEVANN_ID, CARP_ID}): + mul = 2 + elif SITE == 'rdrama.net' and cls == Submission and target.author.id not in {8768,3402,5214,12719}: + if (target.domain.endswith('.win') or 'forum' in target.domain + or (target.domain in BOOSTED_SITES and not target.url.startswith('/')) + or target.sub in BOOSTED_HOLES): mul = 2 - if cls == Submission and target.author.id not in {8768,3402,5214,12719}: - if (target.domain.endswith('.win') or 'forum' in target.domain - or (target.domain in BOOSTED_SITES and not target.url.startswith('/')) - or target.sub in BOOSTED_HOLES): - mul = 2 - elif not target.sub and target.body_html: - x = target.body_html.count('" target="_blank" rel="nofollow noopener">') - x += target.body_html.count('') + x += target.body_html.count('