protected void Application_Start()
        {
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            var nw = new Nightwatch();

            Application["Nightwatch"] = nw;
            if (GlobalConst.PlanetWarsMode == PlanetWarsModes.Running)
            {
                Application["PwMatchMaker"] = new PlanetWarsMatchMaker(nw.Tas);
            }
            new Thread(() => nw.Start()).Start();


            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
        }
        protected void Application_Start()
        {
            var nw = new Nightwatch(Server.MapPath("/"));

            Application["Nightwatch"] = nw;
#if DEPLOY
            if (GlobalConst.PlanetWarsMode == PlanetWarsModes.Running)
            {
                Application["PwMatchMaker"] = new PlanetWarsMatchMaker(nw.Tas);
            }
            Global.Nightwatch.Start();
#endif


            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
        }
Exemple #3
0
        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);
        }
        protected void Application_Start()
        {
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            var nw = new Nightwatch();
            Application["Nightwatch"] = nw;
            if (GlobalConst.PlanetWarsMode == PlanetWarsModes.Running) Application["PwMatchMaker"] = new PlanetWarsMatchMaker(nw.Tas);
            new Thread(()=> nw.Start()).Start();
            

            AreaRegistration.RegisterAllAreas();
            RegisterRoutes(RouteTable.Routes);
        }
        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);
        }