boost all stealth holes by x2
parent
9aea183438
commit
31b685db57
|
@ -381,7 +381,6 @@ if SITE_NAME == 'rDrama':
|
|||
'changelog',
|
||||
'programming',
|
||||
'slackernews',
|
||||
'chudrama',
|
||||
'wallstreetbets',
|
||||
'lit',
|
||||
'vidya',
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue