summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/network.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index d2d276495..cb49c1ea0 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -748,6 +748,11 @@ static void NetworkInitGameInfo()
NetworkClientInfo *ci = new NetworkClientInfo(CLIENT_ID_SERVER);
ci->client_playas = _network_dedicated ? COMPANY_SPECTATOR : _local_company;
+ /* Give the server a valid IP; banning it is pointless anyways */
+ sockaddr_in sock;
+ memset(&sock, 0, sizeof(sock));
+ sock.sin_family = AF_INET;
+ ci->client_address = NetworkAddress((sockaddr*)&sock, sizeof(sock));
strecpy(ci->client_name, _settings_client.network.client_name, lastof(ci->client_name));
strecpy(ci->unique_id, _settings_client.network.network_id, lastof(ci->unique_id));