exclude jannies from antispam-checking

pull/182/head
Aevann 2023-08-08 15:04:15 +03:00
parent 8c76addad6
commit 1272d3dd1e
1 changed files with 4 additions and 2 deletions

View File

@ -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