server can restricts voting from a mode for any map

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6434 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2011-05-14 16:26:10 +00:00
parent d6a6ef4eb7
commit c85be9cb54
+14 -3
View File
@@ -99,10 +99,21 @@ struct mapaction : serveraction
{
const char *s = scl.adminonlymaps[i], *h = strchr(s, '#'), *m = behindpath(map);
size_t sl = strlen(s);
if(h && h != s)
if(h)
{
sl = h - s;
if(mode != atoi(h + 1)) continue;
if(h != s)
{
sl = h - s;
if(mode != atoi(h + 1)) continue;
}
else
{
if(mode == atoi(h+1))
{
role = CR_ADMIN;
break;
}
}
}
if(sl == strlen(m) && !strncmp(m, scl.adminonlymaps[i], sl)) role = CR_ADMIN;
}