added amb923 - CheckCommandAccess() changes
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401405
This commit is contained in:
@@ -535,7 +535,7 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\sm_trie_tpl.h"
|
||||
RelativePath="..\..\public\sm_trie_tpl.h"
|
||||
>
|
||||
</File>
|
||||
<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)
|
||||
|
||||
Reference in New Issue
Block a user