From be88a74c9a1114a348ac8e6b2786b32fd1849c8e Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 7 Feb 2023 04:15:55 +0200 Subject: [PATCH] minor blackjack improvement --- files/helpers/actions.py | 12 +++++------- files/helpers/config/const.py | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 4659a658d..11a4ba0c6 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -344,15 +344,13 @@ def execute_antispam_submission_check(title, v, url): return True def execute_blackjack(v, target, body, type): - if not body: return True + if not blackjack or not body: return True execute = False - if blackjack and any(i in body.lower() for i in blackjack.split()): - execute = True - shadowban = True - elif blackjack2 and all(i in body.lower() for i in blackjack2.split()): - execute = True - shadowban = v.truescore < 100 + for x in blackjack.split(','): + if all(i in body.lower() for i in x.split()): + execute = True + shadowban = v.truescore < 100 if execute: if shadowban: diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 92ffe2156..9470a2ebe 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -48,7 +48,6 @@ CF_KEY = environ.get("CF_KEY").strip() CF_ZONE = environ.get("CF_ZONE").strip() GLOBAL = environ.get("GLOBAL", "").strip() blackjack = environ.get("BLACKJACK", "").strip() -blackjack2 = environ.get("BLACKJACK2", "").strip() FP = environ.get("FP", "").strip() PROGSTACK_MUL = float(environ.get("PROGSTACK_MUL", 2.0)) ENCOURAGED = environ.get("ENCOURAGED", "").strip().split()