From f69ecba53c7f27e6076746b2bede936ce0a9403f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 25 Mar 2022 03:47:07 +0200 Subject: [PATCH] fd --- files/routes/chat.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/routes/chat.py b/files/routes/chat.py index 58bf55a90..4068e9fd9 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -41,7 +41,7 @@ def speak(data, v): vname = v.username.lower() if vname in muted: - if time.time() > muted[vname]: return '', 403 + if time.time() < muted[vname]: return '', 403 else: del muted[vname] global messages, total @@ -57,11 +57,13 @@ def speak(data, v): "text_html":text_html, "text_censored":censor_slurs(text_html, 'chat') } + + broadcast = not v.shadowbanned + emit('speak', data, broadcast=broadcast) messages.append(data) messages = messages[-50:] total += 1 - emit('speak', data, broadcast=True) if v.admin_level > 1: text = text.lower()