public void LoadData() { Out.Info("Loading ServerList..."); Servers = ServersManager.GetServers(); Out.Info("Loading BlockedIp"); BlockedIp = AccountManager.GetBlockedIps(); Out.Debug($"{BlockedIp.Count} ips blocked"); }
static void HandleCommand(string[] cmd) { switch (cmd[0]) { case "rl": ServersManager.Initialize(DatabaseManager.connection); auth.Servers = ServersManager.GetServers(); foreach (AuthClient client in auth.Clients.Values) { foreach (Common.Database.Modeles.Auth.WorldServer s in auth.Servers.Values) { client.Send(new ServerStatusUpdateMessage(new Protocol.Types.GameServerInformations(s.ServerId, s.Status, s.Completion, true, 14))); } } break; case "test": Out.WriteLine("TEST !!!", ConsoleColor.Yellow); break; case "exit": auth.Dispose(); Out.WriteLine("Auth server stopped successfully", ConsoleColor.Cyan); break; case "start": if (auth.Clients != null) { Out.Error("Server already started"); break; } auth.Initialize(ip, port); break; case "world": if (cmd.Length > 1 && cmd[1] == "start") { world = new WorldServer(); } break; default: Out.WriteLine($"Unknown command {cmd[0]}", ConsoleColor.Red); break; } }