| 40 | #include <bridge/include/IVEngineServerBridge.h> |
| 41 | |
| 42 | static 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 | |
| 68 | static cell_t CheckAccess(IPluginContext *pContext, const cell_t *params) |
| 69 | { |
nothing calls this directly
no test coverage detected