summaryrefslogtreecommitdiff
path: root/src/network/network_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r--src/network/network_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 81d4500a2..9868c905e 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1924,7 +1924,7 @@ void NetworkServerDailyLoop()
* Get the IP address/hostname of the connected client.
* @return The IP address.
*/
-const char *ServerNetworkGameSocketHandler::GetClientIP()
+const std::string &ServerNetworkGameSocketHandler::GetClientIP()
{
return this->client_address.GetHostname();
}
@@ -2094,7 +2094,7 @@ uint NetworkServerKickOrBanIP(const std::string &ip, bool ban, const std::string
for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) {
if (cs->client_id == CLIENT_ID_SERVER) continue;
if (cs->client_id == _redirect_console_to_client) continue;
- if (cs->client_address.IsInNetmask(ip.c_str())) {
+ if (cs->client_address.IsInNetmask(ip)) {
NetworkServerKickClient(cs->client_id, reason);
n++;
}