From 2cae0cd54cffde47e771e614175249ed1d75fe85 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 Apr 2011 16:03:48 +0000 Subject: (svn r22368) -Codechange: move the IP address field from the ClientInfo to ClientSocket --- src/network/network_server.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/network/network_server.cpp') diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index f8f966e76..cc3fd09d0 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1813,7 +1813,7 @@ void NetworkServerDailyLoop() */ const char *ServerNetworkGameSocketHandler::GetClientIP() { - return this->GetInfo()->client_address.GetHostname(); + return this->client_address.GetHostname(); } void NetworkServerShowStatusToConsole() @@ -1936,11 +1936,11 @@ uint NetworkServerKickOrBanIP(const char *ip, bool ban) uint n = 0; /* There can be multiple clients with the same IP, kick them all */ - NetworkClientInfo *ci; - FOR_ALL_CLIENT_INFOS(ci) { - if (ci->client_id == CLIENT_ID_SERVER) continue; - if (ci->client_address.IsInNetmask(const_cast(ip))) { - NetworkServerKickClient(ci->client_id); + NetworkClientSocket *cs; + FOR_ALL_CLIENT_SOCKETS(cs) { + if (cs->client_id == CLIENT_ID_SERVER) continue; + if (cs->client_address.IsInNetmask(const_cast(ip))) { + NetworkServerKickClient(cs->client_id); n++; } } -- cgit v1.2.3-70-g09d2