Prevent basecommands from printing to disconnected clients (#1138)

This commit is contained in:
sneak-it 2020-02-07 01:32:16 -05:00 committed by Asher Baker
parent c6df989061
commit 6d3e4e756f

View File

@ -395,11 +395,16 @@ public Action Command_Rcon(int client, int args)
if (client == 0) // They will already see the response in the console.
{
ServerCommand("%s", argstring);
} else {
}
else
{
char responseBuffer[4096];
ServerCommandEx(responseBuffer, sizeof(responseBuffer), "%s", argstring);
if (IsClientConnected(client))
{
ReplyToCommand(client, responseBuffer);
}
}
return Plugin_Handled;
}