Fix being able to nominate same map multiple times (
bug 5109, r=psychonic)
1.1 --- a/plugins/mapchooser.sp Fri Jan 17 23:14:40 2014 -0500
1.2 +++ b/plugins/mapchooser.sp Fri Jan 17 23:21:16 2014 -0500
1.3 @@ -980,6 +980,12 @@
1.4 return Nominate_InvalidMap;
1.5 }
1.6
1.7 + /* Map already in the vote */
1.8 + if (FindStringInArray(g_NominateList, map) != -1)
1.9 + {
1.10 + return Nominate_AlreadyInVote;
1.11 + }
1.12 +
1.13 new index;
1.14
1.15 /* Look to replace an existing nomination by this client - Nominations made with owner = 0 aren't replaced */
1.16 @@ -1002,13 +1008,6 @@
1.17 return Nominate_VoteFull;
1.18 }
1.19
1.20 - /* Map already in the vote */
1.21 - if (FindStringInArray(g_NominateList, map) != -1)
1.22 - {
1.23 - return Nominate_AlreadyInVote;
1.24 - }
1.25 -
1.26 -
1.27 PushArrayString(g_NominateList, map);
1.28 PushArrayCell(g_NominateOwners, owner);
1.29 g_NominateCount++;