MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / CheckCommandAccess

Function CheckCommandAccess

core/logic/smn_console.cpp:42–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40#include <bridge/include/IVEngineServerBridge.h>
41
42static cell_t CheckCommandAccess(IPluginContext *pContext, const cell_t *params)
43{
44 if (params[1] == 0)
45 {
46 return 1;
47 }
48
49 char *cmd;
50 pContext->LocalToString(params[2], &cmd);
51
52 /* Match up with an admin command if possible */
53 FlagBits bits = params[3];
54 bool found_command = false;
55 if (params[0] < 4 || !params[4])
56 {
57 found_command = bridge->LookForCommandAdminFlags(cmd, &bits);
58 }
59
60 if (!found_command)
61 {
62 adminsys->GetCommandOverride(cmd, Override_Command, &bits);
63 }
64
65 return adminsys->CheckClientCommandAccess(params[1], cmd, bits) ? 1 : 0;
66}
67
68static cell_t CheckAccess(IPluginContext *pContext, const cell_t *params)
69{

Callers

nothing calls this directly

Calls 3

GetCommandOverrideMethod · 0.80

Tested by

no test coverage detected