ConsoleCommandManager class.
Inheritance: CommandHandler
示例#1
0
        /// <summary>
        ///     Help parancs függvénye.
        /// </summary>
        protected void HandleHelp(ConsoleMessage sConsoleMessage)
        {
            if (sConsoleMessage.Info.Length == 1)
            {
                var text = sLManager.GetConsoleCommandTexts("help");
                if (text.Length < 2)
                {
                    Log.Error("Console", sLConsole.Translations("NoFound2"));
                    return;
                }

                string commands = string.Empty;

                foreach (var command in CCommandManager.GetCommandHandler())
                {
                    if (command.Key == "help")
                    {
                        continue;
                    }

                    commands += ", " + command.Key;
                }

                Log.Notice("Console", text[0]);
                Log.Notice("Console", text[1], commands.Remove(0, 2, ", "));
                return;
            }

            foreach (var t in sLManager.GetConsoleCommandHelpTexts(sConsoleMessage.Info.SplitToString(1, "/")))
            {
                Log.Notice("Console", t);
            }
        }
示例#2
0
        /// <summary>
        ///     Indulási függvény.
        /// </summary>
        public Console(string ServerName)
        {
            Log.Notice("Console", sLConsole.GetString("Successfully started the Console."));
            InitThread();

            Log.Debug("Console", sLConsole.GetString("Console reader starting..."));
            Start();

            CCManager = new CCommandManager();
            CCManager.ServerName = ServerName;
            CCManager.Channel = IRCConfig.List[ServerName].MasterChannel;
            System.Console.Title = SchumixBase.Title + " || Console Writing Channel: " + CCManager.ServerName + SchumixBase.Colon + CCManager.Channel;
        }
示例#3
0
        /// <summary>
        ///     Indulási függvény.
        /// </summary>
        public Console(string ServerName)
        {
            Log.Notice("Console", sLConsole.GetString("Successfully started the Console."));
            InitThread();

            Log.Debug("Console", sLConsole.GetString("Console reader starting..."));
            Start();

            CCManager            = new CCommandManager();
            CCManager.ServerName = ServerName;
            CCManager.Channel    = IRCConfig.List[ServerName].MasterChannel;
            System.Console.Title = SchumixBase.Title + " || Console Writing Channel: " + CCManager.ServerName + SchumixBase.Colon + CCManager.Channel;
        }