boost posts containing specific words (like "effortpost"
parent
6c55e4d47e
commit
b479a0ac0a
|
@ -55,6 +55,8 @@ KOFI_TOKEN = environ.get("KOFI_TOKEN", "").strip()
|
|||
KOFI_LINK = environ.get("KOFI_LINK", "").strip()
|
||||
PROGSTACK_MUL = float(environ.get("PROGSTACK_MUL", 2.0))
|
||||
FORBIDDEN = environ.get("FORBIDDEN", "").strip().split()
|
||||
ENCOURAGED = environ.get("ENCOURAGED", "").strip().split()
|
||||
ENCOURAGED2 = environ.get("ENCOURAGED2", "").strip().split()
|
||||
|
||||
class Service(Enum):
|
||||
RDRAMA = auto()
|
||||
|
|
|
@ -167,6 +167,8 @@ def vote_post_comment(target_id, new, v, cls, vote_cls):
|
|||
mul = 1
|
||||
if target.is_approved == PROGSTACK_ID:
|
||||
mul = PROGSTACK_MUL
|
||||
elif cls == Submission and (any(i in target.title.lower() for i in ENCOURAGED) or any(i in target.url.lower() for i in ENCOURAGED2)):
|
||||
mul = PROGSTACK_MUL
|
||||
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,3377,5214,12719}:
|
||||
|
|
Loading…
Reference in New Issue