Beispiel #1
0
        public static void SetupStats()
        {
            Timer = BaseServer.Pool.CallPeriodically(500, UpdateTask);

            MyConsole.SetName((int)LeftStats.UpTime, "UpTime");
            MyConsole.SetName((int)LeftStats.ClientConnected, "Clients Online");
            MyConsole.SetName((int)LeftStats.NumberErrors, "Errors");
        }
Beispiel #2
0
 private static void UpdateTask()
 {
     try
     {
         SetStat(LeftStats.UpTime, BaseServer.GetUpTime());
         SetStat(LeftStats.ClientConnected, AuthServer.Instance.GetClientsCount().ToString());
         SetStat(LeftStats.NumberErrors, "0");
     }
     catch (Exception ex)
     {
         MyConsole.Err(ex.Message, true);
         throw;
     }
 }
Beispiel #3
0
 public static void SetStat(LeftStats stat, string value)
 {
     MyConsole.SetProperty((int)stat, value);
 }