Ejemplo n.º 1
0
 public Iw5mCheck(FDOAuthServerCheck authentication)
 {
     NPServer = "iw5.prod.fourdeltaone.net";
     NPPort = 3025;
     MasterServer = "iw5.prod.fourdeltaone.net";
     MasterPort = 27950;
     Authentication = authentication;
 }
Ejemplo n.º 2
0
 public Iw5mCheck(FDOAuthServerCheck authentication)
 {
     NPServer       = "iw5.prod.fourdeltaone.net";
     NPPort         = 3025;
     MasterServer   = "iw5.prod.fourdeltaone.net";
     MasterPort     = 27950;
     Authentication = authentication;
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("API server initializing...");

            config = new XmlDocument();
            config.Load("config.xml");

            var cancel = new CancellationTokenSource();

            var appender = new log4net.Appender.ManagedColoredConsoleAppender();
            appender.Threshold = log4net.Core.Level.All;
            var x = (XmlElement)config.SelectSingleNode("//backend/log4net");
            if (x == null)
            {
                Console.WriteLine("Error: log4net configuration node not found. Check your config.xml");
                Console.ReadKey();
                return;
            }
            XmlConfigurator.Configure(x);

            api = new APIServer();
            auth = new FDOAuthServerCheck();
            iw4m = new Iw4mCheck(auth);
            iw5m = new Iw5mCheck(auth);
            forum = new WebCheck("http://fourdeltaone.net/index.php", 60);
            kmshost = new KmshostCheck();

            auth.TestUsername = config.SelectSingleNode("//backend/auth-username").InnerText;
            auth.TestPassword = config.SelectSingleNode("//backend/auth-password").InnerText;

            BackendName = config.SelectSingleNode("//backend/backend-name").InnerText;

            api.Content.Add("login", auth);
            api.Content.Add("iw4m", iw4m);
            api.Content.Add("iw5m", iw5m);
            api.Content.Add("forum", forum);
            api.Content.Add("kmshost", kmshost);
            api.Content.Add("backend-name", BackendName);
            api.ServerLists.Add("iw4m", iw4m.AccessibleMasterServers[0].ServersListed);
            api.ServerLists.Add("iw5m", iw5m.ListedServers);
            api.StatusIndicators.Add("iw4m", new Iw4mStatusIndicator(ref iw4m));
            api.StatusIndicators.Add("iw5m", new Iw5mStatusIndicator(ref iw5m));
            api.StatusIndicators.Add("login", new LoginStatusIndicator(ref auth));
            api.StatusIndicators.Add("forum", new WebStatusIndicator(ref forum));
            api.StatusIndicators.Add("kmshost", new KmshostStatusIndicator(ref kmshost));

            api.Start();

            Console.WriteLine("API server starting, regular checks are now enabled.");

            while (true)
            {
                var task = Task.Factory.StartNew(() => CheckNow(), cancel.Token);
                Thread.Sleep(30 * 1000);
                task.Wait();
                task.Dispose();
            }
        }
Ejemplo n.º 4
0
        public Iw4mCheck(FDOAuthServerCheck authentication)
        {
            NPServer     = "iw4.prod.fourdeltaone.net";
            NPPort       = 3025;
            MasterServer = "iw4.prod.fourdeltaone.net";
            MasterPort   = 20810;

            // 4D1
            AddMasterServer("4D1", "iw4.prod.fourdeltaone.net");

            Authentication = authentication;
        }
Ejemplo n.º 5
0
        public Iw4mCheck(FDOAuthServerCheck authentication)
        {
            NPServer = "iw4.prod.fourdeltaone.net";
            NPPort = 3025;
            MasterServer = "iw4.prod.fourdeltaone.net";
            MasterPort = 20810;

            // 4D1
            AddMasterServer("4D1", "iw4.prod.fourdeltaone.net");

            // Legacy
            AddMasterServer("aRev", "master.alterrev.net", 20810, true);
            AddMasterServer("iw4p", "server.iw4play.de", 20810, true);

            Authentication = authentication;
        }
Ejemplo n.º 6
0
        public Iw4mCheck(FDOAuthServerCheck authentication)
        {
            NPServer     = "iw4.prod.fourdeltaone.net";
            NPPort       = 3025;
            MasterServer = "iw4.prod.fourdeltaone.net";
            MasterPort   = 20810;

            // 4D1
            AddMasterServer("4D1", "iw4.prod.fourdeltaone.net");

            // Legacy
            AddMasterServer("aRev", "master.alterrev.net", 20810, true);
            AddMasterServer("iw4p", "server.iw4play.de", 20810, true);

            Authentication = authentication;
        }
Ejemplo n.º 7
0
 public LoginStatusIndicator(ref FDOAuthServerCheck auth)
 {
     this.auth = auth;
 }