From 05491341335dbc9dd7e0054dc4c8512c92d51a0e Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 7 May 2022 03:52:33 +0200 Subject: [PATCH] Fix netconsole bug --- r5dev/netconsole/netconsole.cpp | 5 +++++ r5dev/vstdlib/completion.cpp | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/r5dev/netconsole/netconsole.cpp b/r5dev/netconsole/netconsole.cpp index 9067057f..cb0a8fa5 100644 --- a/r5dev/netconsole/netconsole.cpp +++ b/r5dev/netconsole/netconsole.cpp @@ -139,6 +139,11 @@ void CNetCon::UserInput(void) this->Send(svSerialized); } } + else // Single arg command query. + { + std::string svSerialized = this->Serialize(svInput.c_str(), "", cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND); + this->Send(svSerialized); + } } else // Setup connection from input. { diff --git a/r5dev/vstdlib/completion.cpp b/r5dev/vstdlib/completion.cpp index b68cc29b..6b45a0d6 100644 --- a/r5dev/vstdlib/completion.cpp +++ b/r5dev/vstdlib/completion.cpp @@ -646,7 +646,6 @@ _RCON_CmdQuery_f_CompletionFunc */ void _RCON_CmdQuery_f_CompletionFunc(const CCommand& args) { - if (args.ArgC() < 2) { if (g_pRConClient->IsInitialized()