forked from rDrama/rDrama
boost all stealth holes by x2
parent
9aea183438
commit
31b685db57
|
@ -381,7 +381,6 @@ if SITE_NAME == 'rDrama':
|
||||||
'changelog',
|
'changelog',
|
||||||
'programming',
|
'programming',
|
||||||
'slackernews',
|
'slackernews',
|
||||||
'chudrama',
|
|
||||||
'wallstreetbets',
|
'wallstreetbets',
|
||||||
'lit',
|
'lit',
|
||||||
'vidya',
|
'vidya',
|
||||||
|
|
|
@ -2,7 +2,7 @@ from os import path
|
||||||
|
|
||||||
from sqlalchemy.orm import scoped_session
|
from sqlalchemy.orm import scoped_session
|
||||||
|
|
||||||
from files.classes import Emoji
|
from files.classes import Emoji, Sub
|
||||||
from files.helpers.config.const import *
|
from files.helpers.config.const import *
|
||||||
|
|
||||||
SNAPPY_KONGS = []
|
SNAPPY_KONGS = []
|
||||||
|
@ -11,9 +11,10 @@ marseys_const2 = []
|
||||||
marsey_mappings = {}
|
marsey_mappings = {}
|
||||||
SNAPPY_MARSEYS = []
|
SNAPPY_MARSEYS = []
|
||||||
SNAPPY_QUOTES = []
|
SNAPPY_QUOTES = []
|
||||||
|
STEALTH_HOLES = []
|
||||||
|
|
||||||
def const_initialize(db:scoped_session):
|
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_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']
|
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 = db.query(Emoji.name).filter(Emoji.kind=="Donkey Kong", Emoji.submitter_id==None).all()
|
||||||
SNAPPY_KONGS = [f':#{x[0]}:' for x in SNAPPY_KONGS]
|
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.commit()
|
||||||
db.close()
|
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
|
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('/'))):
|
or (target.domain in BOOSTED_SITES and not target.url.startswith('/'))):
|
||||||
mul = 2
|
mul = 2
|
||||||
|
elif target.sub in STEALTH_HOLES:
|
||||||
|
mul = 2
|
||||||
elif target.sub in BOOSTED_HOLES:
|
elif target.sub in BOOSTED_HOLES:
|
||||||
mul = 1.25
|
mul = 1.25
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue