From 781fb5b4f7261a3731b08645db7c7607d2c75825 Mon Sep 17 00:00:00 2001 From: Louvenarde Date: Sat, 17 Jul 2021 09:49:58 +0200 Subject: [PATCH] RCon hotfix to prevent listen servers from being stuck on Awaiting challenge... --- src/Components/Modules/Network.cpp | 2 +- src/Components/Modules/RCon.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/Network.cpp b/src/Components/Modules/Network.cpp index b0e652ee..37ab799d 100644 --- a/src/Components/Modules/Network.cpp +++ b/src/Components/Modules/Network.cpp @@ -121,7 +121,7 @@ namespace Components } bool Network::Address::isValid() { - return (this->getType() != Game::netadrtype_t::NA_BAD && this->getType() >= Game::netadrtype_t::NA_BOT && this->getType() <= Game::netadrtype_t::NA_IP && this->address.ip.full != 0); + return (this->getType() != Game::netadrtype_t::NA_BAD && this->getType() >= Game::netadrtype_t::NA_BOT && this->getType() <= Game::netadrtype_t::NA_IP); } void Network::Handle(const std::string& packet, Utils::Slot callback) { diff --git a/src/Components/Modules/RCon.cpp b/src/Components/Modules/RCon.cpp index e773f67d..c9d78656 100644 --- a/src/Components/Modules/RCon.cpp +++ b/src/Components/Modules/RCon.cpp @@ -29,7 +29,7 @@ namespace Components if (!RCon::Password.empty()) { Network::Address target(addr); - if (!target.isValid()) + if (!target.isValid() || target.getIP().full == 0) { target = Party::Target(); }