From f1bfb872438935fef158ab5b47e8c2830b0789a4 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 16 Nov 2022 07:00:03 -0600 Subject: [PATCH] chat: permission for mute bypass --- files/helpers/const.py | 1 + files/routes/chat.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index be79381b6..09ff5de81 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -208,6 +208,7 @@ PERMS = { # Minimum admin_level to perform action. 'ADMIN_ACTIONS_REVERT': 3, 'ADMIN_MOP_VISIBLE': 2, 'ADMIN_HOME_VISIBLE': 2, + 'CHAT_BYPASS_MUTE': 2, 'DOMAINS_BAN': 3, 'HOLE_CREATE': 0, 'FLAGS_REMOVE': 2, diff --git a/files/routes/chat.py b/files/routes/chat.py index 68e70ad0b..fb4a7753f 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -53,7 +53,7 @@ def speak(data, v): if TRUESCORE_CHAT_LIMIT and v.truescore < TRUESCORE_CHAT_LIMIT and not v.club_allowed: return '', 403 vname = v.username.lower() - if vname in muted and not v.admin_level >= PERMS['USER_BAN']: + if vname in muted and not v.admin_level >= PERMS['CHAT_BYPASS_MUTE']: if time.time() < muted[vname]: return '', 403 else: del muted[vname]