From 1eaebd2ea1d73cccf8d84b07afb52cb4adcb07a2 Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 6 Nov 2022 19:49:50 -0500 Subject: [PATCH] Extend special API comment display to bussy-bot. --- files/helpers/const.py | 4 ++-- files/routes/comments.py | 2 +- files/routes/votes.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 21704442f..f6963b92d 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -409,7 +409,7 @@ SNAPPY_ID = 2 LONGPOSTBOT_ID = 3 ZOZBOT_ID = 4 BASEDBOT_ID = 0 -BBBB_ID = 0 +PRIVILEGED_USER_BOTS = () SCHIZO_ID = 0 KIPPY_ID = 0 @@ -482,7 +482,7 @@ if SITE.startswith('rdrama.'): SNAPPY_ID = 261 LONGPOSTBOT_ID = 1832 ZOZBOT_ID = 1833 - BBBB_ID = 12125 + PRIVILEGED_USER_BOTS = (12125, 16049) SCHIZO_ID = 8494 KIPPY_ID = 7150 diff --git a/files/routes/comments.py b/files/routes/comments.py index 23c293cef..67077e672 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -216,7 +216,7 @@ def comment(v): abort(403, "You can't reply to users who have blocked you or users that you have blocked.") is_bot = (v.client is not None - and v.id != BBBB_ID + and v.id not in PRIVILEGED_USER_BOTS or (SITE == 'pcmemes.net' and v.id == SNAPPY_ID)) execute_antispam_comment_check(body, v) diff --git a/files/routes/votes.py b/files/routes/votes.py index 4c1758d87..7ff6db1fb 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -45,7 +45,7 @@ def vote_info_get(v, link): def vote_post_comment(target_id, new, v, cls, vote_cls): if new == "-1" and DISABLE_DOWNVOTES: abort(403) if new not in ["-1", "0", "1"]: abort(400) - if v.client and v.id != BBBB_ID: abort(403) + if v.client and v.id not in PRIVILEGED_USER_BOTS: abort(403) new = int(new) target = None if cls == Submission: