From a04521b55a091ad20ad60094e22bd2a0afd40f4b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 5 Nov 2008 21:02:07 -0800 Subject: [PATCH] Fixed "nextmap" command being spammable (bug 3391, r=pred). --- plugins/basetriggers.sp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/plugins/basetriggers.sp b/plugins/basetriggers.sp index b784f7f1..912552af 100644 --- a/plugins/basetriggers.sp +++ b/plugins/basetriggers.sp @@ -184,27 +184,13 @@ public Action:Command_Nextmap(client, args) GetNextMap(map, sizeof(map)); - if(GetConVarInt(g_Cvar_TriggerShow)) + if (mapchooser && EndOfMapVoteEnabled() && !HasEndOfMapVoteFinished()) { - if (mapchooser && EndOfMapVoteEnabled() && !HasEndOfMapVoteFinished()) - { - PrintToChatAll("[SM] %t", "Pending Vote"); - } - else - { - PrintToChatAll("[SM] %t", "Next Map", map); - } + ReplyToCommand(client, "[SM] %t", "Pending Vote"); } else { - if (mapchooser && EndOfMapVoteEnabled() && !HasEndOfMapVoteFinished()) - { - ReplyToCommand(client, "[SM] %t", "Pending Vote"); - } - else - { - ReplyToCommand(client, "[SM] %t", "Next Map", map); - } + ReplyToCommand(client, "[SM] %t", "Next Map", map); } return Plugin_Handled;