From 29e6d2afffa30a30d4bcf4cee86af7b394608f68 Mon Sep 17 00:00:00 2001 From: Edo Date: Thu, 20 Oct 2022 15:06:29 +0100 Subject: [PATCH] [Proto] Update source file (#535) --- src/Components/Modules/RCon.cpp | 10 +++++----- src/Proto/rcon.proto | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Components/Modules/RCon.cpp b/src/Components/Modules/RCon.cpp index 85c22238..8023114d 100644 --- a/src/Components/Modules/RCon.cpp +++ b/src/Components/Modules/RCon.cpp @@ -88,7 +88,7 @@ namespace Components const auto signedMsg = Utils::Cryptography::ECC::SignMessage(key, data); Proto::RCon::Command rconExec; - rconExec.set_commands(RconContainer.command); + rconExec.set_command(RconContainer.command); rconExec.set_signature(signedMsg); Network::SendCommand(address, "rconExecute", rconExec.SerializeAsString()); @@ -199,10 +199,10 @@ namespace Components RconContainer.timestamp = 0; - Proto::RCon::Command command; - command.ParseFromString(data); + Proto::RCon::Command rconExec; + rconExec.ParseFromString(data); - if (!Utils::Cryptography::ECC::VerifyMessage(RconKey, RconContainer.challenge, command.signature())) + if (!Utils::Cryptography::ECC::VerifyMessage(RconKey, RconContainer.challenge, rconExec.signature())) { return; } @@ -213,7 +213,7 @@ namespace Components RconContainer.output.append(output); }); - Command::Execute(command.commands(), true); + Command::Execute(rconExec.command(), true); Logger::PipeOutput(nullptr); diff --git a/src/Proto/rcon.proto b/src/Proto/rcon.proto index d949edbc..e498e88d 100644 --- a/src/Proto/rcon.proto +++ b/src/Proto/rcon.proto @@ -4,6 +4,6 @@ package Proto.RCon; message Command { - bytes commands = 1; + bytes command = 1; bytes signature = 2; }