static void Main(string[] args) { //Log.Archive = Environment.CurrentDirectory + @"/Log/"; //Log.LogFile = Log.Archive + AppDomain.CurrentDomain.FriendlyName.Replace(".exe", ".txt"); tc = new List<TestClient>(); Shared.Util.CliUtil.WriteHeader("Client", ConsoleColor.Green); console = new ConsoleCommands(); console.Add("AddClient", "<count>", "Add client for test", HandleAddClient); console.Add("CloseAll", "Close all client", HandleCloseAll); console.Add("Login", "<username> <password>", "Login Request", HandleLogin); console.Wait(); }
static void Main(string[] args) { Log.Archive = Environment.CurrentDirectory + @"/Log/"; Log.LogFile = Log.Archive + AppDomain.CurrentDomain.FriendlyName.Replace(".exe", ".txt"); Localization.Parse(Environment.CurrentDirectory, "*.lang", System.IO.SearchOption.AllDirectories); CliUtil.WriteHeader(Localization.Get("Server.Program.Main.Title"), ConsoleColor.Red); CliUtil.LoadingTitle(); var console = new ConsoleCommands(); console.Add("status", "<GCollet:Bool>", Localization.Get("Server.Program.Main.ConsoleCommands.Description.Status"), HandleStatus); console.Add("ChangeCrypter", "<port>", Localization.Get("Server.Program.Main.ConsoleCommands.Description.ChangeCrypter"), HandleChangeCrypter); console.Add("Ping", "<port>", Localization.Get("Server.Program.Main.ConsoleCommands.Description.Ping"), HandlePing); ts = new TestServer(); ts.Start(8080); CliUtil.RunningTitle(); console.Wait(); }
private void RegisterCommands() { ConsoleCommands.Add("chat", new PublicChat()); ConsoleCommands.Add("chat_team", new TeamChat()); ConsoleCommands.Add("chat_private", new PrivateChat()); ConsoleCommands.Add("chat_help", new Help(this)); RemoteAdminCommands.Add("chat_mute", new Mute()); RemoteAdminCommands.Add("chat_unmute", new Unmute()); RemoteAdminCommands.Add("chat_delete_mutes", new DeleteMutes()); RemoteAdminCommands.Add("chat_show_mutes", new ShowMutes()); }
private static void InitiateConsole() { DisableSizing(); Console.SetOut(new Out()); Console.CursorVisible = false; Draw.Logo(); //TODO: Add QuestBuilder(); //RewardBuilder(); InitiateSession(); ConsoleUpdater(); ConsoleCommands.Add(); KeepAlive(); }
private static void InitiateConsole() { Draw.Logo(); if (INTERACTIVE_CONSOLE) { DisableSizing(); Console.CursorVisible = false; } //RewardBuilder(); InitiateSession(); ConsoleUpdater(); ConsoleCommands.Add(); KeepAlive(); }
/// <summary> /// Loads all necessary components and starts the server. /// </summary> public void Run() { if (_running) { throw new Exception("Server is already running."); } CliUtil.WriteHeader("Web Server", ConsoleColor.DarkRed); CliUtil.LoadingTitle(); this.NavigateToRoot(); // Conf this.LoadConf(this.Conf = new WebConf()); // Database this.InitDatabase(this.Database = new AuraDb(), this.Conf); // Data this.LoadData(DataLoad.Features, false); // Localization this.LoadLocalization(this.Conf); // Server this.StartWebServer(); // Scripts (after web server) this.LoadScripts(); CliUtil.RunningTitle(); _running = true; // Commands var commands = new ConsoleCommands(); commands.Add("reloaddata", "Reloads all data.", this.ReloadData); commands.Wait(); }