From 8af12ad2c93bfe861dcc6638ac5b4f6bdfe805fa Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 26 Aug 2023 00:00:53 +0300 Subject: [PATCH] make CC and chat threshold the same for movie night purposes --- files/classes/user.py | 4 ++-- files/helpers/config/const.py | 7 +++---- files/routes/chat.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index a845c9c93..bb29a5238 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -274,7 +274,7 @@ class User(Base): @lazy def allowed_in_chat(self): if self.admin_level: return True - if self.truescore >= TRUESCORE_CHAT_MINIMUM: return True + if self.truescore >= TRUESCORE_CC_CHAT_MINIMUM: return True if self.patron: return True return False @@ -1192,7 +1192,7 @@ class User(Base): if self.can_see_restricted_holes != None: return self.can_see_restricted_holes - if self.truescore >= TRUESCORE_CC_MINIMUM: return True + if self.truescore >= TRUESCORE_CC_CHAT_MINIMUM: return True if SITE == 'rdrama.net' and self.id == 5237: return True diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 6434fc04d..dfdca75be 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -543,10 +543,9 @@ BIO_FRIENDS_ENEMIES_HTML_LENGTH_LIMIT = 20000 # do not make larger than 20000 ch COSMETIC_AWARD_COIN_AWARD_PCT = 0.50 -TRUESCORE_CHAT_MINIMUM = 0 +TRUESCORE_CC_CHAT_MINIMUM = 0 TRUESCORE_GHOST_MINIMUM = 10 TRUESCORE_DONATE_MINIMUM = 10 -TRUESCORE_CC_MINIMUM = 1 TRUESCORE_CHUDRAMA_MINIMUM = 10 LOGGEDIN_ACTIVE_TIME = 15 * 60 @@ -684,7 +683,7 @@ if SITE == 'rdrama.net': CHANGELOG_THREAD = 165657 ADMIGGER_THREADS = {SIDEBAR_THREAD, BANNER_THREAD, BADGE_THREAD, SNAPPY_THREAD, CHANGELOG_THREAD, 79285, 166300, 187078} - TRUESCORE_CHAT_MINIMUM = 10 + TRUESCORE_CC_CHAT_MINIMUM = 10 HOLE_COST = 50000 HOLE_INACTIVITY_DELETION = True @@ -831,7 +830,7 @@ elif SITE == 'watchpeopledie.tv': MAX_VIDEO_SIZE_MB = 500 MAX_VIDEO_SIZE_MB_PATRON = 500 - TRUESCORE_CHAT_MINIMUM = 50 + TRUESCORE_CC_CHAT_MINIMUM = 50 HOLE_NAME = 'flair' HOLE_STYLE_FLAIR = True diff --git a/files/routes/chat.py b/files/routes/chat.py index ceaf33821..b086987f1 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -47,7 +47,7 @@ def is_not_permabanned_socketio(f): wrapper.__name__ = f.__name__ return wrapper -CHAT_ERROR_MESSAGE = f"To prevent spam, you'll need {TRUESCORE_CHAT_MINIMUM} truescore (this is {TRUESCORE_CHAT_MINIMUM} votes, either up or down, on any threads or comments you've made) in order to access chat. Sorry! I love you 💖" +CHAT_ERROR_MESSAGE = f"To prevent spam, you'll need {TRUESCORE_CC_CHAT_MINIMUM} truescore (this is {TRUESCORE_CC_CHAT_MINIMUM} votes, either up or down, on any threads or comments you've made) in order to access chat. Sorry! I love you 💖" @app.get("/chat") @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)