public static void StartApplication(MvcApplication mvcApplication) { var listener = new ZkServerTraceListener(); Trace.Listeners.Add(listener); ZkServerRunner = new ServerRunner(mvcApplication.Server.MapPath("~")); Server = ZkServerRunner.ZkLobbyServer; ZkServerRunner.Run(); listener.ZkLobbyServer = Server; SetupPaypalInterface(); if (GlobalConst.PlanetWarsMode == PlanetWarsModes.Running) { PlanetWarsMatchMaker = new PlanetWarsMatchMaker(Server); } }
public static void StartApplication(MvcApplication mvcApplication) { var listener = new ZkServerTraceListener(); Trace.Listeners.Add(listener); ForumPostIndexer = new ForumPostIndexer(); ZkServerRunner = new ServerRunner(mvcApplication.Server.MapPath("~")); Server = ZkServerRunner.ZkLobbyServer; AutoRegistrator = new AutoRegistrator(MapPath("~")); AutoRegistrator.RunMainAndMapSyncAsync(); ZkServerRunner.Run(); listener.ZkLobbyServer = Server; SetupPaypalInterface(); if (GlobalConst.PlanetWarsMode == PlanetWarsModes.Running) PlanetWarsMatchMaker = new PlanetWarsMatchMaker(Server); }
public static void StartApplication(MvcApplication mvcApplication) { if (Interlocked.Exchange(ref isStarted, 1) == 1) return; // prevent double start var listener = new ZkServerTraceListener(); Trace.Listeners.Add(listener); Trace.TraceInformation("Starting Zero-K.info web and application"); GlobalConst.SiteDiskPath = MapPath("~"); LadderCalculator = new LadderCalculator(); ZkServerRunner = new ServerRunner(mvcApplication.Server.MapPath("~"), new PlanetwarsEventCreator(), LadderCalculator); Server = ZkServerRunner.ZkLobbyServer; Trace.TraceInformation("Starting lobby server"); ZkServerRunner.Run(); listener.ZkLobbyServer = Server; ForumPostIndexer = new ForumPostIndexer(); Trace.TraceInformation("Starting autoregistrator"); AutoRegistrator = new AutoRegistrator(MapPath("~")); AutoRegistrator.RunMainAndMapSyncAsync(); SetupPaypalInterface(); if (GlobalConst.PlanetWarsMode == PlanetWarsModes.Running) PlanetWarsMatchMaker = new PlanetWarsMatchMaker(Server); }
public static void StartApplication(MvcApplication mvcApplication) { var listener = new ZkServerTraceListener(); Trace.Listeners.Add(listener); ZkServerRunner = new ServerRunner(mvcApplication.Server.MapPath("~")); Server = ZkServerRunner.ZkLobbyServer; ZkServerRunner.Run(); listener.ZkLobbyServer = Server; SetupPaypalInterface(); if (GlobalConst.PlanetWarsMode == PlanetWarsModes.Running) PlanetWarsMatchMaker = new PlanetWarsMatchMaker(Server); }