From b5d9b18da40440da5a33d44cf65d1d51c39e2df3 Mon Sep 17 00:00:00 2001 From: Fyren Date: Wed, 18 Nov 2009 15:42:21 -0800 Subject: [PATCH] Fix rare basevotes map vote problem (bug 3905, r=dvander) --- plugins/basevotes/votemap.sp | 15 ++++++++++----- translations/basevotes.phrases.txt | 8 ++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/plugins/basevotes/votemap.sp b/plugins/basevotes/votemap.sp index 9e16930a..cd26fb0f 100644 --- a/plugins/basevotes/votemap.sp +++ b/plugins/basevotes/votemap.sp @@ -132,8 +132,6 @@ public MenuHandler_Map(Handle:menu, MenuAction:action, param1, param2) else // no action was selected. { /* Re-enable the menu option */ - g_VoteMapInUse = false; - ResetMenu(); } } @@ -187,9 +185,16 @@ public AdminMenu_VoteMap(Handle:topmenu, } else if (action == TopMenuAction_SelectOption) { - g_VoteMapInUse = true; - ResetMenu(); - DisplayMenu(g_MapList, param, MENU_TIME_FOREVER); + if (!g_VoteMapInUse) + { + ResetMenu(); + g_VoteMapInUse = true; + DisplayMenu(g_MapList, param, MENU_TIME_FOREVER); + } + else + { + PrintToChat(param, "[SM] %T", "Map Vote In Use", param); + } } else if (action == TopMenuAction_DrawOption) { diff --git a/translations/basevotes.phrases.txt b/translations/basevotes.phrases.txt index 6b9f07dd..230c100e 100644 --- a/translations/basevotes.phrases.txt +++ b/translations/basevotes.phrases.txt @@ -28,6 +28,11 @@ "#format" "{1:s}" "en" "Map Vote: {1}" } + + "Map Vote In Use" + { + "en" "Another admin is currently using the map vote menu." + } "Change Map To" { @@ -68,14 +73,17 @@ { "en" "Kick vote" } + "Ban vote" { "en" "Ban vote" } + "Map vote" { "en" "Map vote" } + "Confirm Vote" { "en" "Confirm Vote"