From 2f8f8f07d6e21fc9609aee471e14e2d1c940f935 Mon Sep 17 00:00:00 2001 From: Tom <25043847+Douile@users.noreply.github.com> Date: Sat, 21 Mar 2020 16:42:28 +0000 Subject: [PATCH] Prevent clients from spamming global chat using sm_nominate Using the nominate command it is possible to spam global chat by alternating between two maps e.g. bind mwheeldown "sm_nominate de_dust2;sm_nominate de_mirage;" By replying to successful nominations instead of putting in global this issue is prevented as clients can only spam themselves. --- addons/sourcemod/scripting/nominations_extended.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sourcemod/scripting/nominations_extended.sp b/addons/sourcemod/scripting/nominations_extended.sp index 5b7719e..6c976dd 100644 --- a/addons/sourcemod/scripting/nominations_extended.sp +++ b/addons/sourcemod/scripting/nominations_extended.sp @@ -275,7 +275,7 @@ public Action:Command_Nominate(client, args) decl String:name[MAX_NAME_LENGTH]; GetClientName(client, name, sizeof(name)); - PrintToChatAll("[NE] %t", "Map Nominated", name, mapname); + CReplyToCommand(client, "[NE] %t", "Map Nominated", name, mapname); LogMessage("%s nominated %s", name, mapname); return Plugin_Continue; @@ -515,4 +515,4 @@ stock bool:IsNominateAllowed(client) } return true; -} \ No newline at end of file +}