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 GitHub
parent 4a8c869b7e
commit b6a6387f16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,10 +395,15 @@ 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);
ReplyToCommand(client, responseBuffer);
if (IsClientConnected(client))
{
ReplyToCommand(client, responseBuffer);
}
}
return Plugin_Handled;