aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console/LocalConsole.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Framework/Console/LocalConsole.cs
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs24
1 files changed, 12 insertions, 12 deletions
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
51 private const string LOGLEVEL_NONE = "(none)"; 51 private const string LOGLEVEL_NONE = "(none)";
52 52
53 // Used to extract categories for colourization. 53 // Used to extract categories for colourization.
54 private Regex m_categoryRegex 54 private Regex m_categoryRegex
55 = new Regex( 55 = new Regex(
56 @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)", RegexOptions.Singleline | RegexOptions.Compiled); 56 @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)", RegexOptions.Singleline | RegexOptions.Compiled);
57 57
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console
97 97
98 string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt"); 98 string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt");
99 int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100); 99 int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100);
100 m_historyPath = Path.GetFullPath(Path.Combine("../caches", m_historyFile)); 100 m_historyPath = Path.GetFullPath(Path.Combine(Util.configDir(), m_historyFile));
101 m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath); 101 m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath);
102 102
103 if (File.Exists(m_historyPath)) 103 if (File.Exists(m_historyPath))
@@ -167,15 +167,15 @@ namespace OpenSim.Framework.Console
167 { 167 {
168 System.Console.CursorLeft = 0; 168 System.Console.CursorLeft = 0;
169 } 169 }
170 else 170 else
171 { 171 {
172 int bufferWidth = System.Console.BufferWidth; 172 int bufferWidth = System.Console.BufferWidth;
173 173
174 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) 174 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
175 if (bufferWidth > 0 && left >= bufferWidth) 175 if (bufferWidth > 0 && left >= bufferWidth)
176 System.Console.CursorLeft = bufferWidth - 1; 176 System.Console.CursorLeft = bufferWidth - 1;
177 } 177 }
178 178
179 if (top < 0) 179 if (top < 0)
180 { 180 {
181 top = 0; 181 top = 0;
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Console
183 else 183 else
184 { 184 {
185 int bufferHeight = System.Console.BufferHeight; 185 int bufferHeight = System.Console.BufferHeight;
186 186
187 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) 187 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
188 if (bufferHeight > 0 && top >= bufferHeight) 188 if (bufferHeight > 0 && top >= bufferHeight)
189 top = bufferHeight - 1; 189 top = bufferHeight - 1;
@@ -216,14 +216,14 @@ namespace OpenSim.Framework.Console
216 { 216 {
217 System.Console.CursorTop = 0; 217 System.Console.CursorTop = 0;
218 } 218 }
219 else 219 else
220 { 220 {
221 int bufferHeight = System.Console.BufferHeight; 221 int bufferHeight = System.Console.BufferHeight;
222 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657) 222 // On Mono 2.4.2.3 (and possibly above), the buffer value is sometimes erroneously zero (Mantis 4657)
223 if (bufferHeight > 0 && top >= bufferHeight) 223 if (bufferHeight > 0 && top >= bufferHeight)
224 System.Console.CursorTop = bufferHeight - 1; 224 System.Console.CursorTop = bufferHeight - 1;
225 } 225 }
226 226
227 if (left < 0) 227 if (left < 0)
228 { 228 {
229 left = 0; 229 left = 0;
@@ -339,7 +339,7 @@ namespace OpenSim.Framework.Console
339 string outText = text; 339 string outText = text;
340 340
341 if (level != LOGLEVEL_NONE) 341 if (level != LOGLEVEL_NONE)
342 { 342 {
343 MatchCollection matches = m_categoryRegex.Matches(text); 343 MatchCollection matches = m_categoryRegex.Matches(text);
344 344
345 if (matches.Count == 1) 345 if (matches.Count == 1)
@@ -364,7 +364,7 @@ namespace OpenSim.Framework.Console
364 WriteColorText(ConsoleColor.Yellow, outText); 364 WriteColorText(ConsoleColor.Yellow, outText);
365 else 365 else
366 System.Console.Write(outText); 366 System.Console.Write(outText);
367 367
368 System.Console.WriteLine(); 368 System.Console.WriteLine();
369 } 369 }
370 370
@@ -551,7 +551,7 @@ namespace OpenSim.Framework.Console
551 } 551 }
552 552
553 string commandLine = m_commandLine.ToString(); 553 string commandLine = m_commandLine.ToString();
554 554
555 if (isCommand) 555 if (isCommand)
556 { 556 {
557 string[] cmd = Commands.Resolve(Parser.Parse(commandLine)); 557 string[] cmd = Commands.Resolve(Parser.Parse(commandLine));
@@ -573,7 +573,7 @@ namespace OpenSim.Framework.Console
573 // If we're not echoing to screen (e.g. a password) then we probably don't want it in history 573 // If we're not echoing to screen (e.g. a password) then we probably don't want it in history
574 if (m_echo && commandLine != "") 574 if (m_echo && commandLine != "")
575 AddToHistory(commandLine); 575 AddToHistory(commandLine);
576 576
577 return commandLine; 577 return commandLine;
578 default: 578 default:
579 break; 579 break;