예제 #1
0
        void InitRest()
        {
            try {
                if (EnableHttpApi)
                {
                    APIServer = new WebServer(SendResponse, "http://localhost:8080/api/");
                    APIServer.Run();
                    InfoServer = new WebServer(WhoIsResponse, "http://localhost:8080/whois/");
                    InfoServer.Run();
                }
            } catch {
                Server.s.Log("Failed to start local API server");
            }

            IRC = new IRCBot();
            if (Server.irc)
            {
                IRC.Connect();
            }

            locationChecker      = new Thread(ServerTasks.LocationChecks);
            locationChecker.Name = "MCG_LocationCheck";
            locationChecker.Start();

            InitZombieSurvival();
            BlockQueue.Start();

            Log("Finished setting up server, finding classicube.net url..");
            ServerSetupFinished = true;
        }
예제 #2
0
        static void InitRest(SchedulerTask task)
        {
            IRC = new IRCBot();
            if (ServerConfig.UseIRC)
            {
                IRC.Connect();
            }

            InitZombieSurvival();
            InitLavaSurvival();
            MainScheduler.QueueRepeat(BlockQueue.Loop, null,
                                      TimeSpan.FromMilliseconds(BlockQueue.time));
            Critical.QueueRepeat(ServerTasks.LocationChecks, null,
                                 TimeSpan.FromMilliseconds(20));

            Logger.Log(LogType.SystemActivity, "Finished setting up server, finding classicube.net url..");
            ServerSetupFinished = true;
        }
예제 #3
0
        static void InitRest(SchedulerTask task)
        {
            IRC = new IRCBot();
            IRC.LoadControllers();
            IRC.Connect();

            CountdownGame.Instance.AutoStart();
            ZSGame.Instance.AutoStart();
            LSGame.Instance.AutoStart();
            CTFGame.Instance.AutoStart();
            TWGame.Instance.AutoStart();

            MainScheduler.QueueRepeat(BlockQueue.Loop, null,
                                      TimeSpan.FromMilliseconds(BlockQueue.Interval));
            Critical.QueueRepeat(ServerTasks.TickPlayers, null,
                                 TimeSpan.FromMilliseconds(20));

            Logger.Log(LogType.SystemActivity, "Finished setting up server, finding classicube.net url..");
            SetupFinished = true;
        }