From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- OpenSim/Framework/Console/LocalConsole.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework/Console/LocalConsole.cs') diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index d8f8ecc..73f0323 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -51,7 +51,7 @@ namespace OpenSim.Framework.Console private const string LOGLEVEL_NONE = "(none)"; // Used to extract categories for colourization. - private Regex m_categoryRegex + private Regex m_categoryRegex = new Regex( @"^(?.*?)\[(?[^\]]+)\]:?(?.*)", RegexOptions.Singleline | RegexOptions.Compiled); @@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt"); int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100); - m_historyPath = Path.GetFullPath(Path.Combine("../caches", m_historyFile)); + m_historyPath = Path.GetFullPath(Path.Combine(Util.configDir(), m_historyFile)); m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath); if (File.Exists(m_historyPath)) @@ -167,15 +167,15 @@ namespace OpenSim.Framework.Console { System.Console.CursorLeft = 0; } - else + else { int bufferWidth = System.Console.BufferWidth; - + // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) if (bufferWidth > 0 && left >= bufferWidth) System.Console.CursorLeft = bufferWidth - 1; } - + if (top < 0) { top = 0; @@ -183,7 +183,7 @@ namespace OpenSim.Framework.Console else { int bufferHeight = System.Console.BufferHeight; - + // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) if (bufferHeight > 0 && top >= bufferHeight) top = bufferHeight - 1; @@ -216,14 +216,14 @@ namespace OpenSim.Framework.Console { System.Console.CursorTop = 0; } - else + else { int bufferHeight = System.Console.BufferHeight; // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) if (bufferHeight > 0 && top >= bufferHeight) System.Console.CursorTop = bufferHeight - 1; } - + if (left < 0) { left = 0; @@ -339,7 +339,7 @@ namespace OpenSim.Framework.Console string outText = text; if (level != LOGLEVEL_NONE) - { + { MatchCollection matches = m_categoryRegex.Matches(text); if (matches.Count == 1) @@ -364,7 +364,7 @@ namespace OpenSim.Framework.Console WriteColorText(ConsoleColor.Yellow, outText); else System.Console.Write(outText); - + System.Console.WriteLine(); } @@ -551,7 +551,7 @@ namespace OpenSim.Framework.Console } string commandLine = m_commandLine.ToString(); - + if (isCommand) { string[] cmd = Commands.Resolve(Parser.Parse(commandLine)); @@ -573,7 +573,7 @@ namespace OpenSim.Framework.Console // If we're not echoing to screen (e.g. a password) then we probably don't want it in history if (m_echo && commandLine != "") AddToHistory(commandLine); - + return commandLine; default: break; -- cgit v1.1