From 0f8ecd48dc61c2473efcc65c62a5641c983d5302 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Mon, 24 Oct 2022 12:27:25 -0500 Subject: [PATCH] antispam: add antispam bypass --- files/helpers/actions.py | 3 ++- files/helpers/const.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 829cdf55e..518f28729 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -382,7 +382,8 @@ def execute_blackjack(v, target, body, type): return False return True -def execute_antispam_comment_check(body, v): +def execute_antispam_comment_check(body:str, v:User): + if v.id in ANTISPAM_BYPASS_IDS: return if len(body) <= COMMENT_SPAM_LENGTH_THRESHOLD: return now = int(time.time()) cutoff = now - 60 * 60 * 24 diff --git a/files/helpers/const.py b/files/helpers/const.py index 9e1a2860d..81c9f0f25 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -395,6 +395,8 @@ MAX_IMAGE_AUDIO_SIZE_MB_PATRON = 16 MAX_VIDEO_SIZE_MB = 32 MAX_VIDEO_SIZE_MB_PATRON = 64 +ANTISPAM_BYPASS_IDS = [] + if SITE == 'rdrama.net': FEATURES['PRONOUNS'] = True FEATURES['HOUSES'] = True @@ -437,6 +439,8 @@ if SITE == 'rdrama.net': GEESE_ID = 1710 BLACKJACKBTZ_ID = 12732 + ANTISPAM_BYPASS_IDS = [1703, 13427] + GIFT_NOTIF_ID = CARP_ID POLL_THREAD = 79285