| 858 | } |
| 859 | |
| 860 | static cell_t sm_GetCmdArgString(IPluginContext *pContext, const cell_t *params) |
| 861 | { |
| 862 | const ICommandArgs *pCmd = g_HL2.PeekCommandStack(); |
| 863 | |
| 864 | if (!pCmd) |
| 865 | { |
| 866 | return pContext->ThrowNativeError("No command callback available"); |
| 867 | } |
| 868 | |
| 869 | const char *args = pCmd->ArgS(); |
| 870 | size_t length; |
| 871 | |
| 872 | if (!args) |
| 873 | { |
| 874 | args = ""; |
| 875 | } |
| 876 | |
| 877 | pContext->StringToLocalUTF8(params[1], params[2], args, &length); |
| 878 | |
| 879 | return (cell_t)length; |
| 880 | } |
| 881 | |
| 882 | char *g_ServerCommandBuffer = NULL; |
| 883 | cell_t g_ServerCommandBufferLength; |
nothing calls this directly
no test coverage detected