-
-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Description
Help us help you
- I have checked that my issue doesn't exist yet.
- I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
- I can always reproduce the issue with the provided description below.
Environments
| Parameter | Windows | Linux |
|---|---|---|
| Game Client App ID | 440 | 440 |
| Game Server App ID | 232250 | 232250 |
| SourceMod Version | 1.9.0.6275 | 1.9.0.6237 |
| MetaMod Version | 1.10.7-dev | 1.11.0-dev+1105 |
- I have updated SourceMod to the latest version and it still happens.
- I have updated SourceMod to the latest snapshot and it still happens.
- I have updated SourceMM to the latest snapshot and it still happens.
Description
It looks like ServerCommandEx() can't grab output for any command (if executed via server console), if this call placed in command handler, and can "kill" server if used in another subcommand with ServerCommandEx().
Problematic Code (or Steps to Reproduce)
#include <sourcemod>
public void OnPluginStart()
{
RegConsoleCmd("sm_stats", CmdStats);
}
public Action CmdStats(int iClient, int iArgC)
{
char szBuffer[512];
ServerCommandEx(szBuffer, sizeof(szBuffer), "stats");
ReplyToCommand(iClient, "Command length response: %d", strlen(szBuffer));
ReplyToCommand(iClient, "Command output:\n%s", szBuffer);
return Plugin_Handled;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

