added amb923 - CheckCommandAccess() changes

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401405
This commit is contained in:
David Anderson
2007-09-07 02:20:08 +00:00
parent 08403e2b4a
commit db3b9c2fa1
3 changed files with 25 additions and 7 deletions
+1 -1
View File
@@ -535,7 +535,7 @@
>
</File>
<File
RelativePath="..\sm_trie_tpl.h"
RelativePath="..\..\public\sm_trie_tpl.h"
>
</File>
<File
+8 -1
View File
@@ -977,7 +977,14 @@ static cell_t CheckCommandAccess(IPluginContext *pContext, const cell_t *params)
char *cmd;
pContext->LocalToString(params[2], &cmd);
return g_ConCmds.CheckCommandAccess(params[1], cmd, params[3]) ? 1 : 0;
/* Support the newer version which will auto-check for an existing command. */
FlagBits bits = params[3];
if (params[0] == 4 && params[4])
{
g_ConCmds.LookForCommandAdminFlags(cmd, &bits);
}
return g_ConCmds.CheckCommandAccess(params[1], cmd, bits) ? 1 : 0;
}
REGISTER_NATIVES(consoleNatives)