Massive console refactor. Greatly simplify interface.

This commit is contained in:
Melanie
2019-08-20 23:28:59 +01:00
parent f7a496136d
commit 0fd17c08ae
56 changed files with 430 additions and 453 deletions

16
OpenSim/Framework/Console/RemoteConsole.cs Normal file → Executable file
View File

@@ -188,13 +188,19 @@ namespace OpenSim.Framework.Console
m_Server.AddHTTPHandler("/SessionCommand/", HandleHttpSessionCommand);
}
public override void Output(string text, string level)
public override void Output(string format, string level = null, params object[] components)
{
Output(text, level, false, false, false);
if (components.Length == 0)
Output(format, level, false, false, false);
else
Output(String.Format(format, components), level, false, false, false);
}
protected void Output(string text, string level, bool isPrompt, bool isCommand, bool isInput)
{
if (level == null)
level = String.Empty;
// Increment the line number. It was 0 and they start at 1
// so we need to pre-increment.
m_lineNumber++;
@@ -228,12 +234,6 @@ namespace OpenSim.Framework.Console
System.Console.WriteLine(text.Trim());
}
public override void Output(string text)
{
// Output plain (non-logging style) text.
Output(text, String.Empty, false, false, false);
}
public override string ReadLine(string p, bool isCommand, bool e)
{
// Output the prompt an prepare to wait. This