summaryrefslogtreecommitdiffhomepage
path: root/Stars45/NetGameServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/NetGameServer.cpp')
-rw-r--r--Stars45/NetGameServer.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Stars45/NetGameServer.cpp b/Stars45/NetGameServer.cpp
index f2293a4..42e770f 100644
--- a/Stars45/NetGameServer.cpp
+++ b/Stars45/NetGameServer.cpp
@@ -58,6 +58,7 @@
#include "Hangar.h"
#include "FlightDeck.h"
#include "Mission.h"
+#include "Text.h"
#include "NetLayer.h"
#include "NetHost.h"
@@ -77,12 +78,15 @@ NetGameServer::NetGameServer()
{
Print("Constructing NetGameServer\n");
+ Text hostname = "0.0.0.0";
WORD server_port = 11101;
- if (NetServerConfig::GetInstance())
- server_port = NetServerConfig::GetInstance()->GetGamePort();
+ if (NetServerConfig::GetInstance()) {
+ hostname = NetServerConfig::GetInstance()->Hostname();
+ server_port = NetServerConfig::GetInstance()->GetGamePort();
+ }
- NetAddr server(NetHost().Address().IPAddr(), server_port);
+ NetAddr server(hostname.data(), server_port);
link = new(__FILE__,__LINE__) NetLink(server);