mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
RCON client improvement
Use 3rd argument as password instead of 'rcon_password' ConVar if arg count is > 2.
This commit is contained in:
parent
723976d9cb
commit
27eae42b10
@ -8,7 +8,6 @@ enum class PaintMode_t
|
||||
PAINT_INGAMEPANELS = (1 << 1),
|
||||
};
|
||||
|
||||
|
||||
class CEngineVGui
|
||||
{
|
||||
public:
|
||||
|
@ -764,7 +764,15 @@ void RCON_CmdQuery_f(const CCommand& args)
|
||||
{
|
||||
if (strcmp(args.Arg(1), "PASS") == 0) // Auth with RCON server using rcon_password ConVar value.
|
||||
{
|
||||
string svCmdQuery = g_pRConClient->Serialize(rcon_password->GetString(), "", cl_rcon::request_t::SERVERDATA_REQUEST_AUTH);
|
||||
string svCmdQuery;
|
||||
if (args.ArgC() > 2)
|
||||
{
|
||||
svCmdQuery = g_pRConClient->Serialize(args.Arg(2), "", cl_rcon::request_t::SERVERDATA_REQUEST_AUTH);
|
||||
}
|
||||
else // Use 'rcon_password' ConVar as password.
|
||||
{
|
||||
svCmdQuery = g_pRConClient->Serialize(rcon_password->GetString(), "", cl_rcon::request_t::SERVERDATA_REQUEST_AUTH);
|
||||
}
|
||||
g_pRConClient->Send(svCmdQuery);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user