Exemplo n.º 1
0
        public void GetServerStatusTest()
        {
            ResponseCache.Clear();

            ServerStatus serverStatus = EveApi.GetServerStatus();

            Assert.AreEqual(true, serverStatus.ServerOpen);
            Assert.AreEqual(28968, serverStatus.OnlinePlayers);
        }
Exemplo n.º 2
0
        public void ServerStatusPersist()
        {
            ResponseCache.Clear();
            ServerStatus ss = EveApi.GetServerStatus();

            ResponseCache.Save("ResponseCache.xml");
            ResponseCache.Clear();
            ResponseCache.Load("ResponseCache.xml");
            ServerStatus cached = EveApi.GetServerStatus();

            Assert.AreEqual(cached.CachedUntilLocal, ss.CachedUntilLocal);
            Assert.AreEqual(cached.ServerOpen, ss.ServerOpen);
            Assert.AreEqual(cached.OnlinePlayers, ss.OnlinePlayers);
        }
Exemplo n.º 3
0
        public static void ServerStatus()
        {
            ServerStatus serverStatus = EveApi.GetServerStatus();

            if (serverStatus.ServerOpen)
            {
                Console.WriteLine("Tranquility is currently up");
                Console.WriteLine("There are currently {0} players online", serverStatus.OnlinePlayers);
            }
            else
            {
                Console.WriteLine("Tranquility is currently down");
            }
        }
Exemplo n.º 4
0
        //Outputs the current status of Tranquility
        private static void TranquilityStatus()
        {
            ServerStatus status = EveApi.GetServerStatus();
            string       message;

            if (status.ServerOpen)
            {
                message = String.Format("Tranquility is online and has {0} players logged in", status.OnlinePlayers);
            }
            else
            {
                message = "Tranquility is DOWN";
            }
            connection.privmsg(CHANNEL, message);
        }
Exemplo n.º 5
0
 private static ServerStatus getServerStatus()
 {
     return(EveApi.GetServerStatus());
 }