From 31b685db57b59c4da2e2a73c7ea01545dfc8fa72 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 5 Jul 2023 23:39:15 +0300 Subject: [PATCH] boost all stealth holes by x2 --- files/helpers/config/const.py | 1 - files/helpers/const_stateful.py | 7 +++++-- files/routes/votes.py | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index e91d575a4..08a62185c 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -381,7 +381,6 @@ if SITE_NAME == 'rDrama': 'changelog', 'programming', 'slackernews', - 'chudrama', 'wallstreetbets', 'lit', 'vidya', diff --git a/files/helpers/const_stateful.py b/files/helpers/const_stateful.py index 12668dcc4..f131cf992 100644 --- a/files/helpers/const_stateful.py +++ b/files/helpers/const_stateful.py @@ -2,7 +2,7 @@ from os import path from sqlalchemy.orm import scoped_session -from files.classes import Emoji +from files.classes import Emoji, Sub from files.helpers.config.const import * SNAPPY_KONGS = [] @@ -11,9 +11,10 @@ marseys_const2 = [] marsey_mappings = {} SNAPPY_MARSEYS = [] SNAPPY_QUOTES = [] +STEALTH_HOLES = [] def const_initialize(db:scoped_session): - global marseys_const, marseys_const2, marsey_mappings, SNAPPY_KONGS, SNAPPY_MARSEYS, SNAPPY_QUOTES + global marseys_const, marseys_const2, marsey_mappings, SNAPPY_KONGS, SNAPPY_MARSEYS, SNAPPY_QUOTES, STEALTH_HOLES marseys_const = [x[0] for x in db.query(Emoji.name).filter(Emoji.kind=="Marsey", Emoji.submitter_id==None, Emoji.name!='chudsey').all()] marseys_const2 = marseys_const + ['chudsey','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','exclamationpoint','period','questionmark'] @@ -29,6 +30,8 @@ def const_initialize(db:scoped_session): SNAPPY_KONGS = db.query(Emoji.name).filter(Emoji.kind=="Donkey Kong", Emoji.submitter_id==None).all() SNAPPY_KONGS = [f':#{x[0]}:' for x in SNAPPY_KONGS] + STEALTH_HOLES = [x[0] for x in db.query(Sub.name).filter_by(stealth=True).all()] + db.commit() db.close() diff --git a/files/routes/votes.py b/files/routes/votes.py index c50afe5ab..0d26b4670 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -173,6 +173,8 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): if (target.domain.endswith('.win') or 'forum' in target.domain or 'chan' in target.domain or (target.domain in BOOSTED_SITES and not target.url.startswith('/'))): mul = 2 + elif target.sub in STEALTH_HOLES: + mul = 2 elif target.sub in BOOSTED_HOLES: mul = 1.25