diff options
author | alberth <alberth@openttd.org> | 2010-08-29 12:37:49 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-08-29 12:37:49 +0000 |
commit | fa6203fdc30a0879bcee79087573bba1315e0b62 (patch) | |
tree | 0c876dd84fa401b7a3556cde22f17b3034139f49 /src | |
parent | 7af4449fef588a1a10079d8794fa4ff689c27ee4 (diff) | |
download | openttd-fa6203fdc30a0879bcee79087573bba1315e0b62.tar.xz |
(svn r20678) -Codechange: Remove unused NetworkFindClientInfoFromIndex(), NetworkFindClientInfoFromIP().
Diffstat (limited to 'src')
-rw-r--r-- | src/network/network.cpp | 29 | ||||
-rw-r--r-- | src/network/network_func.h | 2 |
2 files changed, 0 insertions, 31 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index 00863f8ad..06c46a01d 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -110,16 +110,6 @@ NetworkClientInfo::~NetworkClientInfo() } /** - * 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 @@ NetworkClientInfo *NetworkFindClientInfoFromClientID(ClientID client_id) } /** - * 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 index 061635338..3a0024f13 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -67,9 +67,7 @@ bool NetworkServerStart(); 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); |