killed InProcServer class; use ListenPort, ExternalPort, and GameName settings from settings.ini

This commit is contained in:
Chris Forbes
2010-03-13 12:46:19 +13:00
parent 8b80ae006a
commit be547479ce
3 changed files with 11 additions and 19 deletions

View File

@@ -156,13 +156,12 @@ namespace OpenRA
internal static void CreateServer()
{
// todo: LobbyInfo is the wrong place for this.
InprocServer.Start(Game.LobbyInfo.GlobalSettings.Mods);
JoinServer(IPAddress.Loopback.ToString(), 1234);
}
internal static void CloseServer()
{
InprocServer.Stop();
var mods = LobbyInfo.GlobalSettings.Mods;
var gameName = "{0} ({1})".F( Settings.GameName, string.Join( ",", mods ) );
Server.Server.ServerMain(gameName, Settings.ListenPort,
Settings.ExternalPort, mods);
JoinServer(IPAddress.Loopback.ToString(), Settings.ListenPort);
}
static int lastTime = Environment.TickCount;