added -ip so you are able to specify which ip to bind the server

This commit is contained in:
Evil Factory
2021-11-08 19:57:13 -03:00
parent 50427390f2
commit 89942fb8f5
5 changed files with 20 additions and 5 deletions
@@ -273,7 +273,7 @@ namespace Barotrauma.Networking
partial void InitProjSpecific();
public ServerSettings(NetworkMember networkMember, string serverName, int port, int queryPort, int maxPlayers, bool isPublic, bool enableUPnP)
public ServerSettings(NetworkMember networkMember, string serverName, int port, int queryPort, int maxPlayers, bool isPublic, bool enableUPnP, IPAddress listenIp)
{
ServerLog = new ServerLog(serverName);
@@ -288,6 +288,7 @@ namespace Barotrauma.Networking
InitProjSpecific();
ServerName = serverName;
ListenIPAddress = listenIp;
Port = port;
QueryPort = queryPort;
EnableUPnP = enableUPnP;
@@ -359,6 +360,8 @@ namespace Barotrauma.Networking
public int QueryPort;
public IPAddress ListenIPAddress;
public bool EnableUPnP;
public ServerLog ServerLog;