chat: allow club users into chat as well

remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-11-13 05:37:53 -06:00
parent 681d8b482a
commit d7f07dcd67
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ user_ids_to_socket_ids = {}
@app.get("/chat")
@is_not_permabanned
def chat(v):
if TRUESCORE_CHAT_LIMIT and v.truescore < TRUESCORE_CHAT_LIMIT: abort(403)
if TRUESCORE_CHAT_LIMIT and v.truescore < TRUESCORE_CHAT_LIMIT and not v.club_allowed: abort(403)
return render_template("chat.html", v=v, messages=messages)
@ -49,7 +49,7 @@ def chat(v):
@ratelimit_user("3/second;10/minute")
def speak(data, v):
if v.is_banned: return '', 403
if TRUESCORE_CHAT_LIMIT and v.truescore < TRUESCORE_CHAT_LIMIT: return '', 403
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: