(svn r20678) -Codechange: Remove unused NetworkFindClientInfoFromIndex(), NetworkFindClientInfoFromIP().

This commit is contained in:
alberth 2010-08-29 12:37:49 +00:00
parent 7af4449fef
commit fa6203fdc3
2 changed files with 0 additions and 31 deletions

View File

@ -109,16 +109,6 @@ NetworkClientInfo::~NetworkClientInfo()
InvalidateWindowData(WC_SEND_NETWORK_MSG, DESTTYPE_CLIENT, this->client_id);
}
/**
* 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
@ -135,25 +125,6 @@ NetworkClientInfo *NetworkFindClientInfoFromClientID(ClientID client_id)
return NULL;
}
/**
* 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

View File

@ -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);