From 5a1ca4959d3211787c029c67652011d63aa3bdcb Mon Sep 17 00:00:00 2001 From: jenz Date: Sat, 4 Jul 2026 00:19:24 +0200 Subject: [PATCH] if its the webclient just filter out all chat messages with ; or " in them --- CELT_VOICE/scripting/nosteam_celt_audio.sp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CELT_VOICE/scripting/nosteam_celt_audio.sp b/CELT_VOICE/scripting/nosteam_celt_audio.sp index d69c682..2935858 100644 --- a/CELT_VOICE/scripting/nosteam_celt_audio.sp +++ b/CELT_VOICE/scripting/nosteam_celt_audio.sp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -13,6 +14,7 @@ Handle g_hCheckMutes = null; Handle g_hCookieTorchMuted = null; bool g_bWasChecked[MAXPLAYERS + 1]; +bool g_bWebclient[MAXPLAYERS + 1]; public Plugin myinfo = { @@ -64,6 +66,7 @@ public Action check_mutes(Handle timer, any data) char dummy[64]; OnClientAuthorized(i, dummy); set_webclient_listen_override(i); + g_bWebclient[i] = true; } for (int j = 1; j <= MaxClients; j++) { @@ -107,11 +110,13 @@ public Action check_mutes(Handle timer, any data) public void OnClientDisconnect(int client) { g_bWasChecked[client] = false; + g_bWebclient[client] = false; } public void OnClientAuthorized(int client, const char[] auth) { g_bWasChecked[client] = true; + g_bWebclient[client] = false; if (IsFakeClient(client)) { return; @@ -131,6 +136,21 @@ public void OnClientAuthorized(int client, const char[] auth) } } +public Action CCC_OnChatMessage(int client, int author, const char[] message) +{ + if (!g_bWebclient[client]) + { + return Plugin_Continue; + } + int index = FindCharInString(message, '"', false); + int index1 = FindCharInString(message, ';', false); + if (index != -1 || index1 != -1) + { + return Plugin_Handled; + } + return Plugin_Continue; +} + public Action Timer_SendVoiceInit(Handle timer, int Serial) { int client;