diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/network.cpp | 2 | ||||
-rw-r--r-- | src/network/network_client.cpp | 2 | ||||
-rw-r--r-- | src/network/network_func.h | 2 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index a407d0d83..930404872 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -795,7 +795,7 @@ bool NetworkClientConnectGame(const std::string &connection_string, CompanyID de std::string resolved_connection_string = ParseGameConnectionString(connection_string, NETWORK_DEFAULT_PORT, &join_as).GetAddressAsString(false); if (!_network_available) return false; - if (!NetworkValidateClientName()) return false; + if (!NetworkValidateOurClientName()) return false; _network_join.connection_string = resolved_connection_string; _network_join.company = join_as; diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index e4b60873f..779ffe6fd 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -1338,7 +1338,7 @@ bool NetworkValidateClientName(std::string &client_name) * See \c NetworkValidateClientName(char*) for details about the functionality. * @return True iff the client name is valid. */ -bool NetworkValidateClientName() +bool NetworkValidateOurClientName() { return NetworkValidateClientName(_settings_client.network.client_name); } diff --git a/src/network/network_func.h b/src/network/network_func.h index ec27d4b78..0dd9328eb 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -36,7 +36,7 @@ extern StringList _network_ban_list; byte NetworkSpectatorCount(); bool NetworkIsValidClientName(const std::string_view client_name); -bool NetworkValidateClientName(); +bool NetworkValidateOurClientName(); bool NetworkValidateClientName(std::string &client_name); bool NetworkValidateServerName(std::string &server_name); void NetworkUpdateClientName(const std::string &client_name); diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 04303e7ac..52819660d 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1263,7 +1263,7 @@ static WindowDesc _network_start_server_window_desc( static void ShowNetworkStartServerWindow() { - if (!NetworkValidateClientName()) return; + if (!NetworkValidateOurClientName()) return; CloseWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_GAME); CloseWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_LOBBY); @@ -1557,7 +1557,7 @@ static WindowDesc _network_lobby_window_desc( */ static void ShowNetworkLobbyWindow(NetworkGameList *ngl) { - if (!NetworkValidateClientName()) return; + if (!NetworkValidateOurClientName()) return; CloseWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_START); CloseWindowById(WC_NETWORK_WINDOW, WN_NETWORK_WINDOW_GAME); |