From 6b625bc7ea0e26f771e3aee196ca5963d96ed405 Mon Sep 17 00:00:00 2001 From: jenz Date: Fri, 3 Jul 2026 21:21:44 +0200 Subject: [PATCH] prevent users from literally copy pasting "; into the chat --- CELT_VOICE/scripting/block_escape_seq.sp | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 CELT_VOICE/scripting/block_escape_seq.sp diff --git a/CELT_VOICE/scripting/block_escape_seq.sp b/CELT_VOICE/scripting/block_escape_seq.sp new file mode 100644 index 0000000..f09d030 --- /dev/null +++ b/CELT_VOICE/scripting/block_escape_seq.sp @@ -0,0 +1,31 @@ +#include + +public Plugin myinfo = { + name = "Block Chat Injection", + author = "unloze", + description = "Blocks console command injection via chat", + version = "1.0", + url = "" +}; + +public void OnPluginStart() +{ + AddCommandListener(Command_Say, "say"); + AddCommandListener(Command_Say, "say_team"); +} + +public Action Command_Say(int client, const char[] command, int argc) +{ + if (client == 0) return Plugin_Continue; + + char sArgs[256]; + GetCmdArgString(sArgs, sizeof(sArgs)); + + if (StrContains(sArgs, "\";") != -1) + { + PrintToChat(client, "[UNLOZE] Message blocked."); + return Plugin_Handled; + } + + return Plugin_Continue; +}