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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user