private void ReadInput()
        {
            while (true)
            {
                string inputLine = _inputConsole.ReadLine();

                ConsoleInputEventArgs eventArgs = new ConsoleInputEventArgs(inputLine);

                _pluginInstance.EventFirer.Fire("stdin:before", eventArgs);
                if (!eventArgs.IsCancelled)
                    _pluginInstance.EventFirer.Fire("stdin:after", eventArgs);
            }
        }
示例#2
0
文件: ServerCore.cs 项目: habb0/IHI-1
        private void ProcessTempInput(ConsoleInputEventArgs eventArgs)
        {
            // TODO: Proper commands

            if (eventArgs.Message != null && eventArgs.Message.Trim() == "shutdown")
                EntryPoint.Exit(true, -1, 5000, true);
        }