From 1272d3dd1e47e5db334871d5d405af4e0fdfd9cb Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 8 Aug 2023 15:04:15 +0300 Subject: [PATCH] exclude jannies from antispam-checking --- files/helpers/actions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index a8ec98e6c..a1c31d3e6 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -385,6 +385,8 @@ def tempban_for_spam(v): def execute_antispam_post_check(title, v, url): + if v.admin_level: return True + now = int(time.time()) cutoff = now - 60 * 60 * 24 @@ -425,7 +427,7 @@ def execute_antispam_post_check(title, v, url): return True def execute_antispam_duplicate_comment_check(v, body_html): - if v.admin_level >= PERMS['USE_ADMIGGER_THREADS']: return + if v.admin_level: return ''' Sanity check for newfriends @@ -445,7 +447,7 @@ def execute_antispam_duplicate_comment_check(v, body_html): abort(403, "Too much spam!") def execute_antispam_comment_check(body, v): - if v.admin_level >= PERMS['USE_ADMIGGER_THREADS']: return + if v.admin_level: return if v.id in ANTISPAM_BYPASS_IDS: return if len(body) <= COMMENT_SPAM_LENGTH_THRESHOLD: return