Fixed amb130 - various menus did not take ADMIN_ALL / ADMIN_ADMIN into account.
This commit is contained in:
parent
a45d98efea
commit
ef41393bc3
@ -215,7 +215,6 @@ public cmdCmdMenu(id, level, cid)
|
||||
}
|
||||
|
||||
g_menuLayer[id] = lvl
|
||||
new flags = get_user_flags(id)
|
||||
g_menuSelectNum[id] = 0
|
||||
|
||||
new a = lvl * MAX_CMDS
|
||||
@ -225,7 +224,7 @@ public cmdCmdMenu(id, level, cid)
|
||||
{
|
||||
d = a + c
|
||||
|
||||
if (g_cmdMisc[d][0] & flags)
|
||||
if (access(id, g_cmdMisc[d][0]))
|
||||
{
|
||||
g_menuSelect[id][g_menuSelectNum[id]++] = d
|
||||
}
|
||||
@ -360,11 +359,10 @@ public cmdCvarMenu(id, level, cid)
|
||||
if (!cmd_access(id, level, cid, 1))
|
||||
return PLUGIN_HANDLED
|
||||
|
||||
new flags = get_user_flags(id)
|
||||
g_menuSelectNum[id] = 0
|
||||
|
||||
for (new a = 0; a < g_cvarNum; ++a)
|
||||
if (g_cvarMisc[a][0] & flags)
|
||||
if (access(id, g_cvarMisc[a][0]))
|
||||
g_menuSelect[id][g_menuSelectNum[id]++] = a
|
||||
|
||||
displayCvarMenu(id, g_menuPosition[id] = 0)
|
||||
|
@ -189,11 +189,9 @@ displayMenu(id, pos)
|
||||
if (end > g_menusNumber) // MENUS_NUMBER
|
||||
end = g_menusNumber // MENUS_NUMBER
|
||||
|
||||
new flags = get_user_flags(id)
|
||||
|
||||
for (new a = start; a < end; ++a)
|
||||
{
|
||||
if ((flags & g_menuAccess[a]) && (is_plugin_loaded(g_menuPlugin[a]) != -1))
|
||||
if (access(id, g_menuAccess[a]) && (is_plugin_loaded(g_menuPlugin[a]) != -1))
|
||||
{
|
||||
keys |= (1<<b)
|
||||
|
||||
@ -250,11 +248,9 @@ clientDisplayMenu(id, pos)
|
||||
if (end > g_clientMenusNumber) // MENUS_NUMBER
|
||||
end = g_clientMenusNumber // MENUS_NUMBER
|
||||
|
||||
new flags = get_user_flags(id)
|
||||
|
||||
for (new a = start; a < end; ++a)
|
||||
{
|
||||
if ((flags & g_clientMenuAccess[a]) && (is_plugin_loaded(g_clientMenuPlugin[a]) != -1))
|
||||
if (access(id, g_clientMenuAccess[a]) && (is_plugin_loaded(g_clientMenuPlugin[a]) != -1))
|
||||
{
|
||||
keys |= (1<<b)
|
||||
|
||||
|
@ -792,7 +792,7 @@ public cmdClcmdMenu(id, level, cid)
|
||||
g_menuSelectNum[id] = 0
|
||||
|
||||
for (new a = 0; a < g_clcmdNum; ++a)
|
||||
if (g_clcmdMisc[a][0] & flags)
|
||||
if (access(id, g_clcmdMisc[a][0]))
|
||||
g_menuSelect[id][g_menuSelectNum[id]++] = a
|
||||
|
||||
g_menuOption[id] = 0
|
||||
|
Loading…
Reference in New Issue
Block a user