# HG changeset patch # User alberth # Date 1283085469 0 # Node ID af02aa3e35c0590196ae3523b370e70f7e443cd3 # Parent 5e3c645a5e637ad33a90cc9cbee5822d37ae0394 (svn r20678) -Codechange: Remove unused NetworkFindClientInfoFromIndex(), NetworkFindClientInfoFromIP(). diff --git a/src/network/network.cpp b/src/network/network.cpp --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -110,16 +110,6 @@ } /** - * Return the CI given it's raw index - * @param index the index to search for - * @return return a pointer to the corresponding NetworkClientInfo struct - */ -NetworkClientInfo *NetworkFindClientInfoFromIndex(ClientIndex index) -{ - return NetworkClientInfo::GetIfValid(index); -} - -/** * Return the CI given it's client-identifier * @param client_id the ClientID to search for * @return return a pointer to the corresponding NetworkClientInfo struct or NULL when not found @@ -136,25 +126,6 @@ } /** - * Return the CI for a given IP - * @param ip IP of the client we are looking for. This must be in string-format - * @return return a pointer to the corresponding NetworkClientInfo struct or NULL when not found - */ -NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip) -{ - NetworkClientInfo *ci; - NetworkAddress address(ip); - - if (address.GetAddressLength() == 0) return NULL; - - FOR_ALL_CLIENT_INFOS(ci) { - if (ci->client_address == address) return ci; - } - - return NULL; -} - -/** * Return the client state given it's client-identifier * @param client_id the ClientID to search for * @return return a pointer to the corresponding NetworkClientSocket struct or NULL when not found diff --git a/src/network/network_func.h b/src/network/network_func.h --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -67,9 +67,7 @@ void NetworkServerUpdateCompanyPassworded(CompanyID company_id, bool passworded); bool NetworkServerChangeClientName(ClientID client_id, const char *new_name); -NetworkClientInfo *NetworkFindClientInfoFromIndex(ClientIndex index); NetworkClientInfo *NetworkFindClientInfoFromClientID(ClientID client_id); -NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip); const char *GetClientIP(NetworkClientInfo *ci); void NetworkServerDoMove(ClientID client_id, CompanyID company_id);