Nominations not blocking current map and excluded maps when used from console.

Removed error causing debug stuff from mapchooser.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402343
This commit is contained in:
Matt Woodrow 2008-07-04 22:54:14 +00:00
parent bf0354dbb9
commit c67a3cd749
2 changed files with 25 additions and 34 deletions

View File

@ -170,11 +170,6 @@ public bool:AskPluginLoad(Handle:myself, bool:late, String:error[], err_max)
return true; return true;
} }
public OnMapStart()
{
Call_Cancel();
}
public OnConfigsExecuted() public OnConfigsExecuted()
{ {
if (ReadMapList(g_MapList, if (ReadMapList(g_MapList,

View File

@ -184,28 +184,6 @@ public Action:Command_Nominate(client, args)
decl String:mapname[64]; decl String:mapname[64];
GetCmdArg(1, mapname, sizeof(mapname)); GetCmdArg(1, mapname, sizeof(mapname));
if (FindStringInArray(g_MapList, mapname) == -1)
{
ReplyToCommand(client, "%t", "Map was not found", mapname);
return Plugin_Handled;
}
new NominateResult:result = NominateMap(mapname, false, client);
if (result > Nominate_Replaced)
{
if (result == Nominate_AlreadyInVote)
{
ReplyToCommand(client, "%t", "Map Already In Vote", mapname);
}
else
{
ReplyToCommand(client, "[SM] %t", "Map Already Nominated");
}
return Plugin_Handled;
}
decl String:item[64]; decl String:item[64];
for (new i = 0; i < GetMenuItemCount(g_MapMenu); i++) for (new i = 0; i < GetMenuItemCount(g_MapMenu); i++)
@ -213,17 +191,35 @@ public Action:Command_Nominate(client, args)
GetMenuItem(g_MapMenu, i, item, sizeof(item)); GetMenuItem(g_MapMenu, i, item, sizeof(item));
if (strcmp(item, mapname) == 0) if (strcmp(item, mapname) == 0)
{ {
new NominateResult:result = NominateMap(mapname, false, client);
if (result > Nominate_Replaced)
{
if (result == Nominate_AlreadyInVote)
{
ReplyToCommand(client, "%t", "Map Already In Vote", mapname);
}
else
{
ReplyToCommand(client, "[SM] %t", "Map Already Nominated");
}
return Plugin_Handled;
}
RemoveMenuItem(g_MapMenu, i); RemoveMenuItem(g_MapMenu, i);
break;
decl String:name[64];
GetClientName(client, name, sizeof(name));
PrintToChatAll("[SM] %t", "Map Nominated", name, mapname);
return Plugin_Continue;
} }
} }
decl String:name[64]; ReplyToCommand(client, "%t", "Map was not found", mapname);
GetClientName(client, name, sizeof(name)); return Plugin_Handled;
PrintToChatAll("[SM] %t", "Map Nominated", name, mapname);
return Plugin_Continue;
} }
AttemptNominate(client) AttemptNominate(client)