diff options
author | Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> | 2022-08-03 02:35:39 +0200 |
---|---|---|
committer | Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> | 2022-08-03 02:35:39 +0200 |
commit | 4b09682ab6749b71552db04a0123402b9219e3f5 (patch) | |
tree | e47667730787da8977d754c147b9a36547abbe9d | |
parent | 8f9e668225fda2775d6556a66b687c3acc299f62 (diff) | |
download | NorthstarLauncher-4b09682ab6749b71552db04a0123402b9219e3f5.tar.gz NorthstarLauncher-4b09682ab6749b71552db04a0123402b9219e3f5.zip |
Netconsole cleanup
-rw-r--r-- | NetConsole/netconsole.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/NetConsole/netconsole.cpp b/NetConsole/netconsole.cpp index 7dfec29b..892f6192 100644 --- a/NetConsole/netconsole.cpp +++ b/NetConsole/netconsole.cpp @@ -99,14 +99,14 @@ void CNetCon::UserInput(void) if (std::getline(std::cin, svInput)) { - if (strcmp(svInput.c_str(), "nquit") == 0) + if (svInput.compare("nquit") == 0) { m_bQuitApplication = true; return; } if (m_abConnEstablished) { - if (strcmp(svInput.c_str(), "disconnect") == 0) + if (svInput.compare("disconnect") == 0) { this->Disconnect(); return; @@ -115,12 +115,12 @@ void CNetCon::UserInput(void) std::vector<std::string> vSubStrings = StringSplit(svInput, ' ', 2); if (vSubStrings.size() > 1) { - if (strcmp(vSubStrings[0].c_str(), "PASS") == 0) // Auth with RCON server. + if (vSubStrings[0].compare("PASS") == 0) // Auth with RCON server. { std::string svSerialized = this->Serialize(vSubStrings[1], "", cl_rcon::request_t::SERVERDATA_REQUEST_AUTH); this->Send(svSerialized); } - else if (strcmp(vSubStrings[0].c_str(), "SET") == 0) // Set value query. + else if (vSubStrings[0].compare("SET") == 0) // Set value query. { if (vSubStrings.size() > 2) { @@ -131,13 +131,13 @@ void CNetCon::UserInput(void) } else // Execute command query. { - std::string svSerialized = this->Serialize(svInput.c_str(), "", cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND); + std::string svSerialized = this->Serialize(svInput, "", cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND); this->Send(svSerialized); } } else if (!svInput.empty()) // Single arg command query. { - std::string svSerialized = this->Serialize(svInput.c_str(), "", cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND); + std::string svSerialized = this->Serialize(svInput, "", cl_rcon::request_t::SERVERDATA_REQUEST_EXECCOMMAND); this->Send(svSerialized); } } |