From ec11a31d9dea6962eb2637cb5e8a664c84555806 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Mon, 18 Jul 2011 03:25:01 +0100 Subject: [PATCH] Updated sm_rcon to use new ServerCommandEx native (bug 5018, r=ds). --- plugins/basecommands.sp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/basecommands.sp b/plugins/basecommands.sp index dbb12cfa..5935c664 100644 --- a/plugins/basecommands.sp +++ b/plugins/basecommands.sp @@ -417,7 +417,14 @@ public Action:Command_Rcon(client, args) LogAction(client, -1, "\"%L\" console command (cmdline \"%s\")", client, argstring); - ServerCommand("%s", argstring); + if (client == 0) // They will already see the response in the console. + { + ServerCommand("%s", argstring); + } else { + new String:responseBuffer[1024]; + ServerCommandEx(responseBuffer, sizeof(responseBuffer), "%s", argstring); + ReplyToCommand(client, responseBuffer); + } return Plugin_Handled; }