Massive console refactor. Greatly simplify interface.
parent
f7a496136d
commit
0fd17c08ae
|
@ -252,7 +252,7 @@ namespace OpenSim.Groups
|
||||||
|
|
||||||
m_debugEnabled = verbose;
|
m_debugEnabled = verbose;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
|
MainConsole.Instance.Output("{0} verbose logging set to {1}", null, Name, m_debugEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -127,7 +127,7 @@ namespace OpenSim.Groups
|
||||||
|
|
||||||
m_debugEnabled = verbose;
|
m_debugEnabled = verbose;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
|
MainConsole.Instance.Output("{0} verbose logging set to {1}", null, Name, m_debugEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
|
|
|
@ -262,14 +262,14 @@ namespace OpenSim.Framework
|
||||||
if (configurationDescription.Trim() != String.Empty)
|
if (configurationDescription.Trim() != String.Empty)
|
||||||
{
|
{
|
||||||
console_result =
|
console_result =
|
||||||
MainConsole.Instance.CmdPrompt(
|
MainConsole.Instance.Prompt(
|
||||||
configurationDescription + ": " + configOption.configurationQuestion,
|
configurationDescription + ": " + configOption.configurationQuestion,
|
||||||
configOption.configurationDefault);
|
configOption.configurationDefault);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console_result =
|
console_result =
|
||||||
MainConsole.Instance.CmdPrompt(configOption.configurationQuestion,
|
MainConsole.Instance.Prompt(configOption.configurationQuestion,
|
||||||
configOption.configurationDefault);
|
configOption.configurationDefault);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,13 +35,13 @@ using log4net;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Console
|
namespace OpenSim.Framework.Console
|
||||||
{
|
{
|
||||||
public class ConsoleBase
|
public class ConsoleBase : IConsole
|
||||||
{
|
{
|
||||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
protected string prompt = "# ";
|
protected string prompt = "# ";
|
||||||
|
|
||||||
public object ConsoleScene { get; set; }
|
public IScene ConsoleScene { get; set; }
|
||||||
|
|
||||||
public string DefaultPrompt { get; set; }
|
public string DefaultPrompt { get; set; }
|
||||||
|
|
||||||
|
@ -58,71 +58,31 @@ namespace OpenSim.Framework.Console
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Output(string text, string level)
|
public virtual void Output(string format, string level = null, params object[] components)
|
||||||
{
|
{
|
||||||
Output(text);
|
System.Console.WriteLine(format, components);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Output(string text)
|
public virtual string Prompt(string p, string def = null, List<char> excludedCharacters = null, bool echo = true)
|
||||||
{
|
|
||||||
System.Console.WriteLine(text);
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void OutputFormat(string format, params object[] components)
|
|
||||||
{
|
|
||||||
Output(string.Format(format, components));
|
|
||||||
}
|
|
||||||
|
|
||||||
public string CmdPrompt(string p)
|
|
||||||
{
|
|
||||||
return ReadLine(String.Format("{0}: ", p), false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string CmdPrompt(string p, string def)
|
|
||||||
{
|
|
||||||
string ret = ReadLine(String.Format("{0} [{1}]: ", p, def), false, true);
|
|
||||||
if (ret == String.Empty)
|
|
||||||
ret = def;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string CmdPrompt(string p, List<char> excludedCharacters)
|
|
||||||
{
|
{
|
||||||
bool itisdone = false;
|
bool itisdone = false;
|
||||||
string ret = String.Empty;
|
string ret = String.Empty;
|
||||||
while (!itisdone)
|
while (!itisdone)
|
||||||
{
|
{
|
||||||
itisdone = true;
|
itisdone = true;
|
||||||
ret = CmdPrompt(p);
|
|
||||||
|
|
||||||
foreach (char c in excludedCharacters)
|
if (def != null)
|
||||||
{
|
ret = ReadLine(String.Format("{0}: ", p), false, echo);
|
||||||
if (ret.Contains(c.ToString()))
|
else
|
||||||
{
|
ret = ReadLine(String.Format("{0} [{1}]: ", p, def), false, echo);
|
||||||
System.Console.WriteLine("The character \"" + c.ToString() + "\" is not permitted.");
|
|
||||||
itisdone = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
if (ret == String.Empty && def != null)
|
||||||
}
|
|
||||||
|
|
||||||
public string CmdPrompt(string p, string def, List<char> excludedCharacters)
|
|
||||||
{
|
|
||||||
bool itisdone = false;
|
|
||||||
string ret = String.Empty;
|
|
||||||
while (!itisdone)
|
|
||||||
{
|
|
||||||
itisdone = true;
|
|
||||||
ret = CmdPrompt(p, def);
|
|
||||||
|
|
||||||
if (ret == String.Empty)
|
|
||||||
{
|
{
|
||||||
ret = def;
|
ret = def;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (excludedCharacters != null)
|
||||||
{
|
{
|
||||||
foreach (char c in excludedCharacters)
|
foreach (char c in excludedCharacters)
|
||||||
{
|
{
|
||||||
|
@ -134,19 +94,20 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
|
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
|
||||||
public string CmdPrompt(string prompt, string defaultresponse, List<string> options)
|
public virtual string Prompt(string prompt, string defaultresponse, List<string> options)
|
||||||
{
|
{
|
||||||
bool itisdone = false;
|
bool itisdone = false;
|
||||||
string optstr = String.Empty;
|
string optstr = String.Empty;
|
||||||
foreach (string s in options)
|
foreach (string s in options)
|
||||||
optstr += " " + s;
|
optstr += " " + s;
|
||||||
|
|
||||||
string temp = CmdPrompt(prompt, defaultresponse);
|
string temp = Prompt(prompt, defaultresponse);
|
||||||
while (itisdone == false)
|
while (itisdone == false)
|
||||||
{
|
{
|
||||||
if (options.Contains(temp))
|
if (options.Contains(temp))
|
||||||
|
@ -156,19 +117,12 @@ namespace OpenSim.Framework.Console
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
System.Console.WriteLine("Valid options are" + optstr);
|
System.Console.WriteLine("Valid options are" + optstr);
|
||||||
temp = CmdPrompt(prompt, defaultresponse);
|
temp = Prompt(prompt, defaultresponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Displays a prompt and waits for the user to enter a string, then returns that string
|
|
||||||
// (Done with no echo and suitable for passwords)
|
|
||||||
public string PasswdPrompt(string p)
|
|
||||||
{
|
|
||||||
return ReadLine(String.Format("{0}: ", p), false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual string ReadLine(string p, bool isCommand, bool e)
|
public virtual string ReadLine(string p, bool isCommand, bool e)
|
||||||
{
|
{
|
||||||
System.Console.Write("{0}", p);
|
System.Console.Write("{0}", p);
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace OpenSim.Framework.Console
|
||||||
{
|
{
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
{
|
{
|
||||||
console.OutputFormat("File {0} already exists. Please move or remove it.", path);
|
console.Output("File {0} already exists. Please move or remove it.", null, path);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (!UUID.TryParse(rawUuid, out uuid))
|
if (!UUID.TryParse(rawUuid, out uuid))
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a valid uuid", rawUuid);
|
console.Output("ERROR: {0} is not a valid uuid", null, rawUuid);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (!uint.TryParse(rawLocalId, out localId))
|
if (!uint.TryParse(rawLocalId, out localId))
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a valid local id", localId);
|
console.Output("ERROR: {0} is not a valid local id", null, localId);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (localId == 0)
|
if (localId == 0)
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a valid local id - it must be greater than 0", localId);
|
console.Output("ERROR: {0} is not a valid local id - it must be greater than 0", null, localId);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
|
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a valid UUID or local id", rawId);
|
console.Output("ERROR: {0} is not a valid UUID or local id", null, rawId);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (!bool.TryParse(rawConsoleString, out b))
|
if (!bool.TryParse(rawConsoleString, out b))
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a true or false value", rawConsoleString);
|
console.Output("ERROR: {0} is not a true or false value", null, rawConsoleString);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (!int.TryParse(rawConsoleInt, out i))
|
if (!int.TryParse(rawConsoleInt, out i))
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a valid integer", rawConsoleInt);
|
console.Output("ERROR: {0} is not a valid integer", null, rawConsoleInt);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (!float.TryParse(rawConsoleInput, out i))
|
if (!float.TryParse(rawConsoleInput, out i))
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a valid float", rawConsoleInput);
|
console.Output("ERROR: {0} is not a valid float", null, rawConsoleInput);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (!double.TryParse(rawConsoleInput, out i))
|
if (!double.TryParse(rawConsoleInput, out i))
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a valid double", rawConsoleInput);
|
console.Output("ERROR: {0} is not a valid double", null, rawConsoleInput);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ namespace OpenSim.Framework.Console
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
{
|
{
|
||||||
if (console != null)
|
if (console != null)
|
||||||
console.OutputFormat("ERROR: {0} is not a positive integer", rawConsoleInt);
|
console.Output("ERROR: {0} is not a positive integer", null, rawConsoleInt);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,7 +359,7 @@ namespace OpenSim.Framework.Console
|
||||||
{
|
{
|
||||||
string outText = text;
|
string outText = text;
|
||||||
|
|
||||||
if (level != LOGLEVEL_NONE)
|
if (level != null)
|
||||||
{
|
{
|
||||||
MatchCollection matches = m_categoryRegex.Matches(text);
|
MatchCollection matches = m_categoryRegex.Matches(text);
|
||||||
|
|
||||||
|
@ -389,20 +389,15 @@ namespace OpenSim.Framework.Console
|
||||||
System.Console.WriteLine();
|
System.Console.WriteLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Output(string text)
|
public override void Output(string format, string level = null, params object[] components)
|
||||||
{
|
{
|
||||||
Output(text, LOGLEVEL_NONE);
|
FireOnOutput(format);
|
||||||
}
|
|
||||||
|
|
||||||
public override void Output(string text, string level)
|
|
||||||
{
|
|
||||||
FireOnOutput(text);
|
|
||||||
|
|
||||||
lock (m_commandLine)
|
lock (m_commandLine)
|
||||||
{
|
{
|
||||||
if (m_cursorYPosition == -1)
|
if (m_cursorYPosition == -1)
|
||||||
{
|
{
|
||||||
WriteLocalText(text, level);
|
WriteLocalText(format, level);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -418,7 +413,7 @@ namespace OpenSim.Framework.Console
|
||||||
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
|
m_cursorYPosition = SetCursorTop(m_cursorYPosition);
|
||||||
SetCursorLeft(0);
|
SetCursorLeft(0);
|
||||||
|
|
||||||
WriteLocalText(text, level);
|
WriteLocalText(format, level);
|
||||||
|
|
||||||
m_cursorYPosition = System.Console.CursorTop;
|
m_cursorYPosition = System.Console.CursorTop;
|
||||||
|
|
||||||
|
|
|
@ -56,21 +56,17 @@ namespace OpenSim.Framework.Console
|
||||||
|
|
||||||
public string ReadLine(string p, bool isCommand, bool e) { return ""; }
|
public string ReadLine(string p, bool isCommand, bool e) { return ""; }
|
||||||
|
|
||||||
public object ConsoleScene {
|
public IScene ConsoleScene {
|
||||||
get { return null; }
|
get { return null; }
|
||||||
set {}
|
set {}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Output(string text, string level) {}
|
public void Output(string format, string level, params object[] components) {}
|
||||||
public void Output(string text) {}
|
|
||||||
public void OutputFormat(string format, params object[] components) {}
|
|
||||||
|
|
||||||
public string CmdPrompt(string p) { return ""; }
|
public string Prompt(string p) { return ""; }
|
||||||
public string CmdPrompt(string p, string def) { return ""; }
|
public string Prompt(string p, string def, List<char> excludedCharacters, bool echo) { return ""; }
|
||||||
public string CmdPrompt(string p, List<char> excludedCharacters) { return ""; }
|
|
||||||
public string CmdPrompt(string p, string def, List<char> excludedCharacters) { return ""; }
|
|
||||||
|
|
||||||
public string CmdPrompt(string prompt, string defaultresponse, List<string> options) { return ""; }
|
public string Prompt(string prompt, string defaultresponse, List<string> options) { return ""; }
|
||||||
|
|
||||||
public string PasswdPrompt(string p) { return ""; }
|
public string PasswdPrompt(string p) { return ""; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,13 +188,19 @@ namespace OpenSim.Framework.Console
|
||||||
m_Server.AddHTTPHandler("/SessionCommand/", HandleHttpSessionCommand);
|
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)
|
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
|
// Increment the line number. It was 0 and they start at 1
|
||||||
// so we need to pre-increment.
|
// so we need to pre-increment.
|
||||||
m_lineNumber++;
|
m_lineNumber++;
|
||||||
|
@ -228,12 +234,6 @@ namespace OpenSim.Framework.Console
|
||||||
System.Console.WriteLine(text.Trim());
|
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)
|
public override string ReadLine(string p, bool isCommand, bool e)
|
||||||
{
|
{
|
||||||
// Output the prompt an prepare to wait. This
|
// Output the prompt an prepare to wait. This
|
||||||
|
|
|
@ -32,22 +32,13 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public interface IConsole
|
public interface IConsole
|
||||||
{
|
{
|
||||||
object ConsoleScene { get; set; }
|
IScene ConsoleScene { get; set; }
|
||||||
|
|
||||||
void Output(string text, string level);
|
void Output(string format, string level = null, params object[] components);
|
||||||
void Output(string text);
|
|
||||||
void OutputFormat(string format, params object[] components);
|
|
||||||
|
|
||||||
string CmdPrompt(string p);
|
string Prompt(string p, string def = null, List<char> excludedCharacters = null, bool echo = true);
|
||||||
string CmdPrompt(string p, string def);
|
|
||||||
string CmdPrompt(string p, List<char> excludedCharacters);
|
|
||||||
string CmdPrompt(string p, string def, List<char> excludedCharacters);
|
|
||||||
|
|
||||||
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
|
// Displays a command prompt and returns a default value, user may only enter 1 of 2 options
|
||||||
string CmdPrompt(string prompt, string defaultresponse, List<string> options);
|
string Prompt(string prompt, string defaultresponse, List<string> options);
|
||||||
|
|
||||||
// Displays a prompt and waits for the user to enter a string, then returns that string
|
|
||||||
// (Done with no echo and suitable for passwords)
|
|
||||||
string PasswdPrompt(string p);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -88,7 +88,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
con.Output("check categories available are:");
|
con.Output("check categories available are:");
|
||||||
|
|
||||||
foreach (string category in RegisteredChecks.Keys)
|
foreach (string category in RegisteredChecks.Keys)
|
||||||
con.OutputFormat(" {0}", category);
|
con.Output(" {0}", null, category);
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
if (cmd[2] == "start")
|
if (cmd[2] == "start")
|
||||||
{
|
{
|
||||||
Start();
|
Start();
|
||||||
con.OutputFormat("Now recording all stats to file every {0}ms", m_statsLogIntervalMs);
|
con.Output("Now recording all stats to file every {0}ms", null, m_statsLogIntervalMs);
|
||||||
}
|
}
|
||||||
else if (cmd[2] == "stop")
|
else if (cmd[2] == "stop")
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
sw.WriteLine(line);
|
sw.WriteLine(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Stats saved to file {0}", path);
|
MainConsole.Instance.Output("Stats saved to file {0}", null, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Start()
|
public static void Start()
|
||||||
|
|
|
@ -117,14 +117,14 @@ namespace OpenSim.Framework.Monitoring
|
||||||
{
|
{
|
||||||
con.Output("Statistic categories available are:");
|
con.Output("Statistic categories available are:");
|
||||||
foreach (string category in RegisteredStats.Keys)
|
foreach (string category in RegisteredStats.Keys)
|
||||||
con.OutputFormat(" {0}", category);
|
con.Output(" {0}", null, category);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SortedDictionary<string, SortedDictionary<string, Stat>> category;
|
SortedDictionary<string, SortedDictionary<string, Stat>> category;
|
||||||
if (!RegisteredStats.TryGetValue(categoryName, out category))
|
if (!RegisteredStats.TryGetValue(categoryName, out category))
|
||||||
{
|
{
|
||||||
con.OutputFormat("No such category as {0}", categoryName);
|
con.Output("No such category as {0}", null, categoryName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -150,14 +150,14 @@ namespace OpenSim.Framework.Monitoring
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
con.OutputFormat(
|
con.Output(
|
||||||
"No such stat {0} in {1}.{2}", statName, categoryName, containerName);
|
"No such stat {0} in {1}.{2}", null, statName, categoryName, containerName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
con.OutputFormat("No such container {0} in category {1}", containerName, categoryName);
|
con.Output("No such container {0} in category {1}", null, containerName, categoryName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,23 +215,23 @@ namespace OpenSim.Framework.Monitoring
|
||||||
if (subCommand == "stop")
|
if (subCommand == "stop")
|
||||||
{
|
{
|
||||||
JobEngine.Stop();
|
JobEngine.Stop();
|
||||||
MainConsole.Instance.OutputFormat("Stopped job engine.");
|
MainConsole.Instance.Output("Stopped job engine.");
|
||||||
}
|
}
|
||||||
else if (subCommand == "start")
|
else if (subCommand == "start")
|
||||||
{
|
{
|
||||||
JobEngine.Start();
|
JobEngine.Start();
|
||||||
MainConsole.Instance.OutputFormat("Started job engine.");
|
MainConsole.Instance.Output("Started job engine.");
|
||||||
}
|
}
|
||||||
else if (subCommand == "status")
|
else if (subCommand == "status")
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Job engine running: {0}", JobEngine.IsRunning);
|
MainConsole.Instance.Output("Job engine running: {0}", null, JobEngine.IsRunning);
|
||||||
|
|
||||||
JobEngine.Job job = JobEngine.CurrentJob;
|
JobEngine.Job job = JobEngine.CurrentJob;
|
||||||
MainConsole.Instance.OutputFormat("Current job {0}", job != null ? job.Name : "none");
|
MainConsole.Instance.Output("Current job {0}", null, job != null ? job.Name : "none");
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Jobs waiting: {0}", JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
|
"Jobs waiting: {0}", null, JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
|
||||||
MainConsole.Instance.OutputFormat("Log Level: {0}", JobEngine.LogLevel);
|
MainConsole.Instance.Output("Log Level: {0}", null, JobEngine.LogLevel);
|
||||||
}
|
}
|
||||||
else if (subCommand == "log")
|
else if (subCommand == "log")
|
||||||
{
|
{
|
||||||
|
@ -246,12 +246,12 @@ namespace OpenSim.Framework.Monitoring
|
||||||
// if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel))
|
// if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel))
|
||||||
// {
|
// {
|
||||||
JobEngine.LogLevel = logLevel;
|
JobEngine.LogLevel = logLevel;
|
||||||
MainConsole.Instance.OutputFormat("Set debug log level to {0}", JobEngine.LogLevel);
|
MainConsole.Instance.Output("Set debug log level to {0}", null, JobEngine.LogLevel);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Unrecognized job engine subcommand {0}", subCommand);
|
MainConsole.Instance.Output("Unrecognized job engine subcommand {0}", null, subCommand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
Addin addin = addins[ndx];
|
Addin addin = addins[ndx];
|
||||||
MainConsole.Instance.OutputFormat("Uninstalling plugin {0}", addin.Id);
|
MainConsole.Instance.Output("Uninstalling plugin {0}", null, addin.Id);
|
||||||
AddinManager.Registry.DisableAddin(addin.Id);
|
AddinManager.Registry.DisableAddin(addin.Id);
|
||||||
addin.Enabled = false;
|
addin.Enabled = false;
|
||||||
IProgressStatus ps = new ConsoleProgressStatus(false);
|
IProgressStatus ps = new ConsoleProgressStatus(false);
|
||||||
|
@ -487,7 +487,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Not Enabled in this domain {0}", addin.Name);
|
MainConsole.Instance.Output("Not Enabled in this domain {0}", null, addin.Name);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -503,7 +503,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
foreach (Addin addin in addins)
|
foreach (Addin addin in addins)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Addin {0}", addin.Name);
|
MainConsole.Instance.Output("Addin {0}", null, addin.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -528,7 +528,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
while (name.Trim() == string.Empty)
|
while (name.Trim() == string.Empty)
|
||||||
{
|
{
|
||||||
name = MainConsole.Instance.CmdPrompt("New region name", name);
|
name = MainConsole.Instance.Prompt("New region name", name);
|
||||||
if (name.Trim() == string.Empty)
|
if (name.Trim() == string.Empty)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Output("Cannot interactively create region with no name");
|
MainConsole.Instance.Output("Cannot interactively create region with no name");
|
||||||
|
@ -570,7 +570,7 @@ namespace OpenSim.Framework
|
||||||
UUID newID = UUID.Random();
|
UUID newID = UUID.Random();
|
||||||
while (RegionID == UUID.Zero)
|
while (RegionID == UUID.Zero)
|
||||||
{
|
{
|
||||||
regionUUID = MainConsole.Instance.CmdPrompt("RegionUUID", newID.ToString());
|
regionUUID = MainConsole.Instance.Prompt("RegionUUID", newID.ToString());
|
||||||
if (!UUID.TryParse(regionUUID.Trim(), out RegionID))
|
if (!UUID.TryParse(regionUUID.Trim(), out RegionID))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Output("RegionUUID must be a valid UUID");
|
MainConsole.Instance.Output("RegionUUID must be a valid UUID");
|
||||||
|
@ -587,7 +587,7 @@ namespace OpenSim.Framework
|
||||||
string location = config.GetString("Location", String.Empty);
|
string location = config.GetString("Location", String.Empty);
|
||||||
if (location == String.Empty)
|
if (location == String.Empty)
|
||||||
{
|
{
|
||||||
location = MainConsole.Instance.CmdPrompt("Region Location", "1000,1000");
|
location = MainConsole.Instance.Prompt("Region Location", "1000,1000");
|
||||||
config.Set("Location", location);
|
config.Set("Location", location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
address = IPAddress.Parse(MainConsole.Instance.CmdPrompt("Internal IP address", "0.0.0.0"));
|
address = IPAddress.Parse(MainConsole.Instance.Prompt("Internal IP address", "0.0.0.0"));
|
||||||
config.Set("InternalAddress", address.ToString());
|
config.Set("InternalAddress", address.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,7 +637,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
port = Convert.ToInt32(MainConsole.Instance.CmdPrompt("Internal port", "9000"));
|
port = Convert.ToInt32(MainConsole.Instance.Prompt("Internal port", "9000"));
|
||||||
config.Set("InternalPort", port);
|
config.Set("InternalPort", port);
|
||||||
}
|
}
|
||||||
m_internalEndPoint = new IPEndPoint(address, port);
|
m_internalEndPoint = new IPEndPoint(address, port);
|
||||||
|
@ -652,7 +652,7 @@ namespace OpenSim.Framework
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (creatingNew)
|
if (creatingNew)
|
||||||
m_resolveAddress = Convert.ToBoolean(MainConsole.Instance.CmdPrompt("Resolve hostname to IP on start (for running inside Docker)", "False"));
|
m_resolveAddress = Convert.ToBoolean(MainConsole.Instance.Prompt("Resolve hostname to IP on start (for running inside Docker)", "False"));
|
||||||
|
|
||||||
config.Set("ResolveAddress", m_resolveAddress.ToString());
|
config.Set("ResolveAddress", m_resolveAddress.ToString());
|
||||||
}
|
}
|
||||||
|
@ -667,7 +667,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
externalName = MainConsole.Instance.CmdPrompt("External host name", "SYSTEMIP");
|
externalName = MainConsole.Instance.Prompt("External host name", "SYSTEMIP");
|
||||||
config.Set("ExternalHostName", externalName);
|
config.Set("ExternalHostName", externalName);
|
||||||
}
|
}
|
||||||
if (externalName == "SYSTEMIP")
|
if (externalName == "SYSTEMIP")
|
||||||
|
|
|
@ -192,35 +192,35 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
if (!int.TryParse(rawNewDebug, out newDebug))
|
if (!int.TryParse(rawNewDebug, out newDebug))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0} is not a valid debug level", rawNewDebug);
|
MainConsole.Instance.Output("{0} is not a valid debug level", null, rawNewDebug);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newDebug < 0 || newDebug > 6)
|
if (newDebug < 0 || newDebug > 6)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0} is outside the valid debug level range of 0..6", newDebug);
|
MainConsole.Instance.Output("{0} is outside the valid debug level range of 0..6", null, newDebug);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allReqs || inReqs)
|
if (allReqs || inReqs)
|
||||||
{
|
{
|
||||||
MainServer.DebugLevel = newDebug;
|
MainServer.DebugLevel = newDebug;
|
||||||
MainConsole.Instance.OutputFormat("IN debug level set to {0}", newDebug);
|
MainConsole.Instance.Output("IN debug level set to {0}", null, newDebug);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allReqs || outReqs)
|
if (allReqs || outReqs)
|
||||||
{
|
{
|
||||||
WebUtil.DebugLevel = newDebug;
|
WebUtil.DebugLevel = newDebug;
|
||||||
MainConsole.Instance.OutputFormat("OUT debug level set to {0}", newDebug);
|
MainConsole.Instance.Output("OUT debug level set to {0}", null, newDebug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (allReqs || inReqs)
|
if (allReqs || inReqs)
|
||||||
MainConsole.Instance.OutputFormat("Current IN debug level is {0}", MainServer.DebugLevel);
|
MainConsole.Instance.Output("Current IN debug level is {0}", null, DebugLevel);
|
||||||
|
|
||||||
if (allReqs || outReqs)
|
if (allReqs || outReqs)
|
||||||
MainConsole.Instance.OutputFormat("Current OUT debug level is {0}", WebUtil.DebugLevel);
|
MainConsole.Instance.Output("Current OUT debug level is {0}", null, WebUtil.DebugLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -492,18 +492,18 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
if (!int.TryParse(rawLevel, out newLevel))
|
if (!int.TryParse(rawLevel, out newLevel))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0} is not a valid debug level", rawLevel);
|
MainConsole.Instance.Output("{0} is not a valid debug level", null, rawLevel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newLevel < 0 || newLevel > Util.MAX_THREADPOOL_LEVEL)
|
if (newLevel < 0 || newLevel > Util.MAX_THREADPOOL_LEVEL)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, newLevel);
|
MainConsole.Instance.Output("{0} is outside the valid debug level range of 0.." + Util.MAX_THREADPOOL_LEVEL, null, newLevel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Util.LogThreadPool = newLevel;
|
Util.LogThreadPool = newLevel;
|
||||||
MainConsole.Instance.OutputFormat("LogThreadPool set to {0}", newLevel);
|
MainConsole.Instance.Output("LogThreadPool set to {0}", null, newLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleForceGc(string module, string[] args)
|
private void HandleForceGc(string module, string[] args)
|
||||||
|
@ -991,9 +991,9 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Watchdog.AbortThread(threadId))
|
if (Watchdog.AbortThread(threadId))
|
||||||
MainConsole.Instance.OutputFormat("Aborted thread with id {0}", threadId);
|
MainConsole.Instance.Output("Aborted thread with id {0}", null, threadId);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.OutputFormat("ERROR - Thread with id {0} not found in managed threads", threadId);
|
MainConsole.Instance.Output("ERROR - Thread with id {0} not found in managed threads", null, threadId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1020,7 +1020,7 @@ namespace OpenSim.Framework.Servers
|
||||||
protected void Notice(string format, params object[] components)
|
protected void Notice(string format, params object[] components)
|
||||||
{
|
{
|
||||||
if (m_console != null)
|
if (m_console != null)
|
||||||
m_console.OutputFormat(format, components);
|
m_console.Output(format, null, components);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Shutdown()
|
public virtual void Shutdown()
|
||||||
|
|
|
@ -782,8 +782,8 @@ namespace OpenSim
|
||||||
Scene existingScene;
|
Scene existingScene;
|
||||||
if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene))
|
if (SceneManager.TryGetScene(regInfo.RegionID, out existingScene))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}",
|
"ERROR: Cannot create region {0} with ID {1}, this ID is already assigned to region {2}", null,
|
||||||
regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName);
|
regInfo.RegionName, regInfo.RegionID, existingScene.RegionInfo.RegionName);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -980,7 +980,7 @@ namespace OpenSim
|
||||||
SceneManager.ForEachSelectedScene(
|
SceneManager.ForEachSelectedScene(
|
||||||
scene =>
|
scene =>
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Loaded region modules in {0} are:", scene.Name);
|
MainConsole.Instance.Output("Loaded region modules in {0} are:", null, scene.Name);
|
||||||
|
|
||||||
List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>();
|
List<IRegionModuleBase> sharedModules = new List<IRegionModuleBase>();
|
||||||
List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>();
|
List<IRegionModuleBase> nonSharedModules = new List<IRegionModuleBase>();
|
||||||
|
@ -994,10 +994,10 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
|
foreach (IRegionModuleBase module in sharedModules.OrderBy(m => m.Name))
|
||||||
MainConsole.Instance.OutputFormat("New Region Module (Shared): {0}", module.Name);
|
MainConsole.Instance.Output("New Region Module (Shared): {0}", null, module.Name);
|
||||||
|
|
||||||
foreach (IRegionModuleBase module in nonSharedModules.OrderBy(m => m.Name))
|
foreach (IRegionModuleBase module in nonSharedModules.OrderBy(m => m.Name))
|
||||||
MainConsole.Instance.OutputFormat("New Region Module (Non-Shared): {0}", module.Name);
|
MainConsole.Instance.Output("New Region Module (Non-Shared): {0}", null, module.Name);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -593,14 +593,14 @@ namespace OpenSim
|
||||||
estateOwnerPassword = Config.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerPassword", null);
|
estateOwnerPassword = Config.Configs[ESTATE_SECTION_NAME].GetString("DefaultEstateOwnerPassword", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Estate {0} has no owner set.", regionInfo.EstateSettings.EstateName);
|
MainConsole.Instance.Output("Estate {0} has no owner set.", null, regionInfo.EstateSettings.EstateName);
|
||||||
List<char> excluded = new List<char>(new char[1]{' '});
|
List<char> excluded = new List<char>(new char[1]{' '});
|
||||||
|
|
||||||
|
|
||||||
if (estateOwnerFirstName == null || estateOwnerLastName == null)
|
if (estateOwnerFirstName == null || estateOwnerLastName == null)
|
||||||
{
|
{
|
||||||
estateOwnerFirstName = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded);
|
estateOwnerFirstName = MainConsole.Instance.Prompt("Estate owner first name", "Test", excluded);
|
||||||
estateOwnerLastName = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded);
|
estateOwnerLastName = MainConsole.Instance.Prompt("Estate owner last name", "User", excluded);
|
||||||
}
|
}
|
||||||
|
|
||||||
UserAccount account
|
UserAccount account
|
||||||
|
@ -624,13 +624,13 @@ namespace OpenSim
|
||||||
if (scene.UserAccountService is UserAccountService)
|
if (scene.UserAccountService is UserAccountService)
|
||||||
{
|
{
|
||||||
if (estateOwnerPassword == null)
|
if (estateOwnerPassword == null)
|
||||||
estateOwnerPassword = MainConsole.Instance.PasswdPrompt("Password");
|
estateOwnerPassword = MainConsole.Instance.Prompt("Password", null, null, false);
|
||||||
|
|
||||||
if (estateOwnerEMail == null)
|
if (estateOwnerEMail == null)
|
||||||
estateOwnerEMail = MainConsole.Instance.CmdPrompt("Email");
|
estateOwnerEMail = MainConsole.Instance.Prompt("Email");
|
||||||
|
|
||||||
if (rawEstateOwnerUuid == null)
|
if (rawEstateOwnerUuid == null)
|
||||||
rawEstateOwnerUuid = MainConsole.Instance.CmdPrompt("User ID", UUID.Random().ToString());
|
rawEstateOwnerUuid = MainConsole.Instance.Prompt("User ID", UUID.Random().ToString());
|
||||||
|
|
||||||
UUID estateOwnerUuid = UUID.Zero;
|
UUID estateOwnerUuid = UUID.Zero;
|
||||||
if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid))
|
if (!UUID.TryParse(rawEstateOwnerUuid, out estateOwnerUuid))
|
||||||
|
@ -999,11 +999,11 @@ namespace OpenSim
|
||||||
if (!string.IsNullOrEmpty(estateName))
|
if (!string.IsNullOrEmpty(estateName))
|
||||||
newName = estateName;
|
newName = estateName;
|
||||||
else
|
else
|
||||||
newName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
|
newName = MainConsole.Instance.Prompt("New estate name", regInfo.EstateSettings.EstateName);
|
||||||
|
|
||||||
if (estatesByName.ContainsKey(newName))
|
if (estatesByName.ContainsKey(newName))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("An estate named {0} already exists. Please try again.", newName);
|
MainConsole.Instance.Output("An estate named {0} already exists. Please try again.", null, newName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1086,7 +1086,7 @@ namespace OpenSim
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string response
|
string response
|
||||||
= MainConsole.Instance.CmdPrompt(
|
= MainConsole.Instance.Prompt(
|
||||||
string.Format(
|
string.Format(
|
||||||
"Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName),
|
"Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName),
|
||||||
"yes",
|
"yes",
|
||||||
|
@ -1103,7 +1103,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
string[] estateNames = estatesByName.Keys.ToArray();
|
string[] estateNames = estatesByName.Keys.ToArray();
|
||||||
response
|
response
|
||||||
= MainConsole.Instance.CmdPrompt(
|
= MainConsole.Instance.Prompt(
|
||||||
string.Format(
|
string.Format(
|
||||||
"Name of estate to join. Existing estate names are ({0})",
|
"Name of estate to join. Existing estate names are ({0})",
|
||||||
string.Join(", ", estateNames)),
|
string.Join(", ", estateNames)),
|
||||||
|
|
11
OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
Normal file → Executable file
11
OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
Normal file → Executable file
|
@ -150,26 +150,27 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel)))
|
if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel)))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: debug eq [0|1|2]");
|
MainConsole.Instance.Output("Usage: debug eq [0|1|2]");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DebugLevel = debugLevel;
|
DebugLevel = debugLevel;
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Set event queue debug level to {0} in {1}", DebugLevel, m_scene.RegionInfo.RegionName);
|
"Set event queue debug level to {0} in {1}", null, DebugLevel, m_scene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void HandleShowEq(string module, string[] args)
|
protected void HandleShowEq(string module, string[] args)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("For scene {0}", m_scene.Name);
|
MainConsole.Instance.Output("For scene {0}", null, m_scene.Name);
|
||||||
|
|
||||||
lock (queues)
|
lock (queues)
|
||||||
{
|
{
|
||||||
foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
|
foreach (KeyValuePair<UUID, Queue<OSD>> kvp in queues)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"For agent {0} there are {1} messages queued for send.",
|
"For agent {0} there are {1} messages queued for send.",
|
||||||
|
null,
|
||||||
kvp.Key, kvp.Value.Count);
|
kvp.Key, kvp.Value.Count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
|
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_console.OutputFormat("Throttles for {0}", m_udpServer.Scene.Name);
|
m_console.Output("Throttles for {0}", null, m_udpServer.Scene.Name);
|
||||||
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
||||||
cdl.AddRow("Adaptive throttles", m_udpServer.ThrottleRates.AdaptiveThrottlesEnabled);
|
cdl.AddRow("Adaptive throttles", m_udpServer.ThrottleRates.AdaptiveThrottlesEnabled);
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
m_console.Output(cdl.ToString());
|
m_console.Output(cdl.ToString());
|
||||||
|
|
||||||
m_console.OutputFormat("{0}\n", GetServerThrottlesReport(m_udpServer));
|
m_console.Output("{0}\n", null, GetServerThrottlesReport(m_udpServer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetServerThrottlesReport(LLUDPServer udpServer)
|
private string GetServerThrottlesReport(LLUDPServer udpServer)
|
||||||
|
@ -297,7 +297,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (args.Length != 7)
|
if (args.Length != 7)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: debug lludp data out <true|false> <avatar-first-name> <avatar-last-name>");
|
MainConsole.Instance.Output("Usage: debug lludp data out <true|false> <avatar-first-name> <avatar-last-name>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,8 +312,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (sp.Firstname == firstName && sp.Lastname == lastName)
|
if (sp.Firstname == firstName && sp.Lastname == lastName)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Data debug for {0} ({1}) set to {2} in {3}",
|
"Data debug for {0} ({1}) set to {2} in {3}",
|
||||||
|
null,
|
||||||
sp.Name, sp.IsChildAgent ? "child" : "root", level, m_udpServer.Scene.Name);
|
sp.Name, sp.IsChildAgent ? "child" : "root", level, m_udpServer.Scene.Name);
|
||||||
|
|
||||||
((LLClientView)sp.ControllingClient).UDPClient.DebugDataOutLevel = level;
|
((LLClientView)sp.ControllingClient).UDPClient.DebugDataOutLevel = level;
|
||||||
|
@ -331,7 +332,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (!all && !one)
|
if (!all && !one)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Usage: debug lludp throttles log <level> [<avatar-first-name> <avatar-last-name>]");
|
"Usage: debug lludp throttles log <level> [<avatar-first-name> <avatar-last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -353,8 +354,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Throttle log level for {0} ({1}) set to {2} in {3}",
|
"Throttle log level for {0} ({1}) set to {2} in {3}",
|
||||||
|
null,
|
||||||
sp.Name, sp.IsChildAgent ? "child" : "root", level, m_udpServer.Scene.Name);
|
sp.Name, sp.IsChildAgent ? "child" : "root", level, m_udpServer.Scene.Name);
|
||||||
|
|
||||||
((LLClientView)sp.ControllingClient).UDPClient.ThrottleDebugLevel = level;
|
((LLClientView)sp.ControllingClient).UDPClient.ThrottleDebugLevel = level;
|
||||||
|
@ -372,7 +374,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (!all && !one)
|
if (!all && !one)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]");
|
"Usage: debug lludp throttles set <param> <value> [<avatar-first-name> <avatar-last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -399,8 +401,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Setting param {0} to {1} for {2} ({3}) in {4}",
|
"Setting param {0} to {1} for {2} ({3}) in {4}",
|
||||||
|
null,
|
||||||
param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
||||||
|
|
||||||
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
||||||
|
@ -422,8 +425,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Setting param {0} to {1} for {2} ({3}) in {4}",
|
"Setting param {0} to {1} for {2} ({3}) in {4}",
|
||||||
|
null,
|
||||||
param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
||||||
|
|
||||||
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
||||||
|
@ -443,8 +447,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Setting param {0} to {1} for {2} ({3}) in {4}",
|
"Setting param {0} to {1} for {2} ({3}) in {4}",
|
||||||
|
null,
|
||||||
param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
||||||
|
|
||||||
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
||||||
|
@ -464,7 +469,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (!all && !one)
|
if (!all && !one)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]");
|
"Usage: debug lludp throttles get [<avatar-first-name> <avatar-last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -482,8 +487,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
if (all || (sp.Firstname == firstName && sp.Lastname == lastName))
|
||||||
{
|
{
|
||||||
m_console.OutputFormat(
|
m_console.Output(
|
||||||
"Status for {0} ({1}) in {2}",
|
"Status for {0} ({1}) in {2}",
|
||||||
|
null,
|
||||||
sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
|
||||||
|
|
||||||
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
||||||
|
@ -504,7 +510,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
|
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_console.OutputFormat("Debug settings for {0}", m_udpServer.Scene.Name);
|
m_console.Output("Debug settings for {0}", null, m_udpServer.Scene.Name);
|
||||||
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
ConsoleDisplayList cdl = new ConsoleDisplayList();
|
||||||
|
|
||||||
long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
|
long maxSceneDripRate = (long)m_udpServer.Throttle.MaxDripRate;
|
||||||
|
@ -527,7 +533,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (args.Length != 5)
|
if (args.Length != 5)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>");
|
MainConsole.Instance.Output("Usage: debug lludp set <param> <value>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,7 +561,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name);
|
m_console.Output("{0} set to {1} in {2}", null, param, rawValue, m_udpServer.Scene.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* not in use, nothing to set/get from lludp
|
/* not in use, nothing to set/get from lludp
|
||||||
|
@ -632,7 +638,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: Cannot specify a user name when setting default/all logging level");
|
MainConsole.Instance.Output("ERROR: Cannot specify a user name when setting default/all logging level");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -646,16 +652,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
m_udpServer.DefaultClientPacketDebugLevel = newDebug;
|
m_udpServer.DefaultClientPacketDebugLevel = newDebug;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Packet debug for {0} clients set to {1} in {2}",
|
"Packet debug for {0} clients set to {1} in {2}",
|
||||||
|
null,
|
||||||
(setAll ? "all" : "future"), m_udpServer.DefaultClientPacketDebugLevel, m_udpServer.Scene.Name);
|
(setAll ? "all" : "future"), m_udpServer.DefaultClientPacketDebugLevel, m_udpServer.Scene.Name);
|
||||||
|
|
||||||
if (setAll)
|
if (setAll)
|
||||||
{
|
{
|
||||||
m_udpServer.Scene.ForEachScenePresence(sp =>
|
m_udpServer.Scene.ForEachScenePresence(sp =>
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Packet debug for {0} ({1}) set to {2} in {3}",
|
"Packet debug for {0} ({1}) set to {2} in {3}",
|
||||||
|
null,
|
||||||
sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_udpServer.Scene.Name);
|
sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_udpServer.Scene.Name);
|
||||||
|
|
||||||
sp.ControllingClient.DebugPacketLevel = newDebug;
|
sp.ControllingClient.DebugPacketLevel = newDebug;
|
||||||
|
@ -668,8 +676,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
if (name == null || sp.Name == name)
|
if (name == null || sp.Name == name)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Packet debug for {0} ({1}) set to {2} in {3}",
|
"Packet debug for {0} ({1}) set to {2} in {3}",
|
||||||
|
null,
|
||||||
sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_udpServer.Scene.Name);
|
sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_udpServer.Scene.Name);
|
||||||
|
|
||||||
sp.ControllingClient.DebugPacketLevel = newDebug;
|
sp.ControllingClient.DebugPacketLevel = newDebug;
|
||||||
|
@ -701,8 +710,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (subCommand == "add")
|
if (subCommand == "add")
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Adding packet {0} to {1} drop list for all connections in {2}",
|
"Adding packet {0} to {1} drop list for all connections in {2}",
|
||||||
|
null,
|
||||||
direction, packetName, m_udpServer.Scene.Name);
|
direction, packetName, m_udpServer.Scene.Name);
|
||||||
|
|
||||||
m_udpServer.Scene.ForEachScenePresence(
|
m_udpServer.Scene.ForEachScenePresence(
|
||||||
|
@ -719,8 +729,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else if (subCommand == "remove")
|
else if (subCommand == "remove")
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Removing packet {0} from {1} drop list for all connections in {2}",
|
"Removing packet {0} from {1} drop list for all connections in {2}",
|
||||||
|
null,
|
||||||
direction, packetName, m_udpServer.Scene.Name);
|
direction, packetName, m_udpServer.Scene.Name);
|
||||||
|
|
||||||
m_udpServer.Scene.ForEachScenePresence(
|
m_udpServer.Scene.ForEachScenePresence(
|
||||||
|
@ -784,8 +795,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
m_udpServer.DiscardInboundAgentUpdates = !m_udpServer.DiscardInboundAgentUpdates;
|
m_udpServer.DiscardInboundAgentUpdates = !m_udpServer.DiscardInboundAgentUpdates;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Discard AgentUpdates now {0} for {1}", m_udpServer.DiscardInboundAgentUpdates, m_udpServer.Scene.Name);
|
"Discard AgentUpdates now {0} for {1}", null, m_udpServer.DiscardInboundAgentUpdates, m_udpServer.Scene.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleStatusCommand(string module, string[] args)
|
private void HandleStatusCommand(string module, string[] args)
|
||||||
|
@ -793,14 +804,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
|
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"IN LLUDP packet processing for {0} is {1}", m_udpServer.Scene.Name, m_udpServer.IsRunningInbound ? "enabled" : "disabled");
|
"IN LLUDP packet processing for {0} is {1}", null, m_udpServer.Scene.Name, m_udpServer.IsRunningInbound ? "enabled" : "disabled");
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"OUT LLUDP packet processing for {0} is {1}", m_udpServer.Scene.Name, m_udpServer.IsRunningOutbound ? "enabled" : "disabled");
|
"OUT LLUDP packet processing for {0} is {1}", null, m_udpServer.Scene.Name, m_udpServer.IsRunningOutbound ? "enabled" : "disabled");
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Packet debug level for new clients is {0}", m_udpServer.DefaultClientPacketDebugLevel);
|
"Packet debug level for new clients is {0}", null, m_udpServer.DefaultClientPacketDebugLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleOqreCommand(string module, string[] args)
|
private void HandleOqreCommand(string module, string[] args)
|
||||||
|
@ -819,24 +830,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (subCommand == "stop")
|
if (subCommand == "stop")
|
||||||
{
|
{
|
||||||
m_udpServer.OqrEngine.Stop();
|
m_udpServer.OqrEngine.Stop();
|
||||||
MainConsole.Instance.OutputFormat("Stopped OQRE for {0}", m_udpServer.Scene.Name);
|
MainConsole.Instance.Output("Stopped OQRE for {0}", null, m_udpServer.Scene.Name);
|
||||||
}
|
}
|
||||||
else if (subCommand == "start")
|
else if (subCommand == "start")
|
||||||
{
|
{
|
||||||
m_udpServer.OqrEngine.Start();
|
m_udpServer.OqrEngine.Start();
|
||||||
MainConsole.Instance.OutputFormat("Started OQRE for {0}", m_udpServer.Scene.Name);
|
MainConsole.Instance.Output("Started OQRE for {0}", null, m_udpServer.Scene.Name);
|
||||||
}
|
}
|
||||||
else if (subCommand == "status")
|
else if (subCommand == "status")
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("OQRE in {0}", m_udpServer.Scene.Name);
|
MainConsole.Instance.Output("OQRE in {0}", null, m_udpServer.Scene.Name);
|
||||||
MainConsole.Instance.OutputFormat("Running: {0}", m_udpServer.OqrEngine.IsRunning);
|
MainConsole.Instance.Output("Running: {0}", null, m_udpServer.OqrEngine.IsRunning);
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Requests waiting: {0}",
|
"Requests waiting: {0}",
|
||||||
|
null,
|
||||||
m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a");
|
m_udpServer.OqrEngine.IsRunning ? m_udpServer.OqrEngine.JobsWaiting.ToString() : "n/a");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Unrecognized OQRE subcommand {0}", subCommand);
|
MainConsole.Instance.Output("Unrecognized OQRE subcommand {0}", null, subCommand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1075,14 +1075,14 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
{
|
{
|
||||||
case "status":
|
case "status":
|
||||||
if (m_MemoryCacheEnabled)
|
if (m_MemoryCacheEnabled)
|
||||||
con.OutputFormat("Memory Cache: {0} assets", m_MemoryCache.Count);
|
con.Output("Memory Cache: {0} assets", null, m_MemoryCache.Count);
|
||||||
else
|
else
|
||||||
con.OutputFormat("Memory cache disabled");
|
con.Output("Memory cache disabled");
|
||||||
|
|
||||||
if (m_FileCacheEnabled)
|
if (m_FileCacheEnabled)
|
||||||
{
|
{
|
||||||
int fileCount = GetFileCacheCount(m_CacheDirectory);
|
int fileCount = GetFileCacheCount(m_CacheDirectory);
|
||||||
con.OutputFormat("File Cache: {0} assets", fileCount);
|
con.Output("File Cache: {0} assets", null, fileCount);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1099,7 +1099,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
{
|
{
|
||||||
string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac","");
|
string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac","");
|
||||||
DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s);
|
DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s);
|
||||||
con.OutputFormat("Region: {0}, {1}", RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss"));
|
con.Output("Region: {0}, {1}", null, RegionID, RegionDeepScanTMStamp.ToString("MM/dd/yyyy hh:mm:ss"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1160,7 +1160,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
{
|
{
|
||||||
if(m_cleanupRunning)
|
if(m_cleanupRunning)
|
||||||
{
|
{
|
||||||
con.OutputFormat("Flotsam assets check already running");
|
con.Output("Flotsam assets check already running");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_cleanupRunning = true;
|
m_cleanupRunning = true;
|
||||||
|
@ -1192,7 +1192,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
}
|
}
|
||||||
m_cleanupRunning = false;
|
m_cleanupRunning = false;
|
||||||
}
|
}
|
||||||
con.OutputFormat("Completed check with {0} assets.", assetReferenceTotal);
|
con.Output("Completed check with {0} assets.", null, assetReferenceTotal);
|
||||||
}, null, "TouchAllSceneAssets", false);
|
}, null, "TouchAllSceneAssets", false);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1200,7 +1200,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
case "expire":
|
case "expire":
|
||||||
if (cmdparams.Length < 3)
|
if (cmdparams.Length < 3)
|
||||||
{
|
{
|
||||||
con.OutputFormat("Invalid parameters for Expire, please specify a valid date & time", cmd);
|
con.Output("Invalid parameters for Expire, please specify a valid date & time");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1218,18 +1218,18 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||||
|
|
||||||
if (!DateTime.TryParse(s_expirationDate, out expirationDate))
|
if (!DateTime.TryParse(s_expirationDate, out expirationDate))
|
||||||
{
|
{
|
||||||
con.OutputFormat("{0} is not a valid date & time", cmd);
|
con.Output("{0} is not a valid date & time", null, cmd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_FileCacheEnabled)
|
if (m_FileCacheEnabled)
|
||||||
CleanExpiredFiles(m_CacheDirectory, expirationDate);
|
CleanExpiredFiles(m_CacheDirectory, expirationDate);
|
||||||
else
|
else
|
||||||
con.OutputFormat("File cache not active, not clearing.");
|
con.Output("File cache not active, not clearing.");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
con.OutputFormat("Unknown command {0}", cmd);
|
con.Output("Unknown command {0}", null, cmd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,27 +159,27 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
|
|
||||||
if (!(args.Length == 4 && int.TryParse(args[3], out debugLevel)))
|
if (!(args.Length == 4 && int.TryParse(args[3], out debugLevel)))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: debug attachments log [0|1]");
|
MainConsole.Instance.Output("Usage: debug attachments log [0|1]");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DebugLevel = debugLevel;
|
DebugLevel = debugLevel;
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Set attachments debug level to {0} in {1}", DebugLevel, m_scene.Name);
|
"Set attachments debug level to {0} in {1}", null, DebugLevel, m_scene.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleDebugAttachmentsStatus(string module, string[] args)
|
private void HandleDebugAttachmentsStatus(string module, string[] args)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Settings for {0}", m_scene.Name);
|
MainConsole.Instance.Output("Settings for {0}", null, m_scene.Name);
|
||||||
MainConsole.Instance.OutputFormat("Debug logging level: {0}", DebugLevel);
|
MainConsole.Instance.Output("Debug logging level: {0}", null, DebugLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void HandleShowAttachmentsCommand(string module, string[] cmd)
|
protected void HandleShowAttachmentsCommand(string module, string[] cmd)
|
||||||
{
|
{
|
||||||
if (cmd.Length != 2 && cmd.Length < 4)
|
if (cmd.Length != 2 && cmd.Length < 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: attachments show [<first-name> <last-name>]");
|
MainConsole.Instance.Output("Usage: attachments show [<first-name> <last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
Normal file → Executable file
2
OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
Normal file → Executable file
|
@ -1370,7 +1370,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
rawTextureID += " (uploaded)";
|
rawTextureID += " (uploaded)";
|
||||||
}
|
}
|
||||||
|
|
||||||
outputAction(BAKED_TEXTURES_REPORT_FORMAT, bt, rawTextureID);
|
outputAction(BAKED_TEXTURES_REPORT_FORMAT, null, bt, rawTextureID);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bakedTextureValid = m_scene.AvatarFactory.ValidateBakedTextureCache(sp);
|
bool bakedTextureValid = m_scene.AvatarFactory.ValidateBakedTextureCache(sp);
|
||||||
|
|
|
@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
|
||||||
{
|
{
|
||||||
if (cmd.Length < 5)
|
if (cmd.Length < 5)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: " + TeleportUserCommandSyntax);
|
MainConsole.Instance.Output("Usage: " + TeleportUserCommandSyntax);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
|
||||||
|
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No user found with name {0} {1}", firstName, lastName);
|
MainConsole.Instance.Output("No user found with name {0} {1}", null, firstName, lastName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
|
||||||
|
|
||||||
if (!m.Success)
|
if (!m.Success)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Invalid destination {0}", rawDestination);
|
MainConsole.Instance.Output("Invalid destination {0}", null, rawDestination);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,8 +169,9 @@ namespace OpenSim.Region.CoreModules.Avatars.Commands
|
||||||
string regionName
|
string regionName
|
||||||
= m.Groups["regionName"].Success ? m.Groups["regionName"].Value : user.Scene.RegionInfo.RegionName;
|
= m.Groups["regionName"].Success ? m.Groups["regionName"].Value : user.Scene.RegionInfo.RegionName;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Teleporting {0} to {1},{2},{3} in {4}",
|
"Teleporting {0} to {1},{2},{3} in {4}",
|
||||||
|
null,
|
||||||
user.Name,
|
user.Name,
|
||||||
m.Groups["x"], m.Groups["y"], m.Groups["z"],
|
m.Groups["x"], m.Groups["y"], m.Groups["z"],
|
||||||
regionName);
|
regionName);
|
||||||
|
|
|
@ -316,15 +316,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
|
||||||
{
|
{
|
||||||
foreach (IMonitor monitor in m_staticMonitors)
|
foreach (IMonitor monitor in m_staticMonitors)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"[MONITOR MODULE]: {0} reports {1} = {2}",
|
"[MONITOR MODULE]: {0} reports {1} = {2}",
|
||||||
|
null,
|
||||||
m_scene.RegionInfo.RegionName, monitor.GetFriendlyName(), monitor.GetFriendlyValue());
|
m_scene.RegionInfo.RegionName, monitor.GetFriendlyName(), monitor.GetFriendlyValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (KeyValuePair<string, float> tuple in m_scene.StatsReporter.GetExtraSimStats())
|
foreach (KeyValuePair<string, float> tuple in m_scene.StatsReporter.GetExtraSimStats())
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"[MONITOR MODULE]: {0} reports {1} = {2}",
|
"[MONITOR MODULE]: {0} reports {1} = {2}",
|
||||||
|
null,
|
||||||
m_scene.RegionInfo.RegionName, tuple.Key, tuple.Value);
|
m_scene.RegionInfo.RegionName, tuple.Key, tuple.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1028,7 +1028,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||||
{
|
{
|
||||||
if (cmd.Length < 3)
|
if (cmd.Length < 3)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: show name <uuid>");
|
MainConsole.Instance.Output("Usage: show name <uuid>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,7 +1040,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||||
|
|
||||||
if(!GetUser(userId, out ud))
|
if(!GetUser(userId, out ud))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No name known for user with id {0}", userId);
|
MainConsole.Instance.Output("No name known for user with id {0}", null, userId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2528,7 +2528,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
|
if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_scene))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
string response = MainConsole.Instance.CmdPrompt(
|
string response = MainConsole.Instance.Prompt(
|
||||||
string.Format(
|
string.Format(
|
||||||
"Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name),
|
"Are you sure that you want to clear all land parcels from {0} (y or n)", m_scene.Name),
|
||||||
"n");
|
"n");
|
||||||
|
@ -2536,11 +2536,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (response.ToLower() == "y")
|
if (response.ToLower() == "y")
|
||||||
{
|
{
|
||||||
Clear(true);
|
Clear(true);
|
||||||
MainConsole.Instance.OutputFormat("Cleared all parcels from {0}", m_scene.Name);
|
MainConsole.Instance.Output("Cleared all parcels from {0}", null, m_scene.Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Aborting clear of all parcels from {0}", m_scene.Name);
|
MainConsole.Instance.Output("Aborting clear of all parcels from {0}", null, m_scene.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2568,7 +2568,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
{
|
{
|
||||||
if (!m_landList.TryGetValue(landLocalId, out lo))
|
if (!m_landList.TryGetValue(landLocalId, out lo))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No parcel found with local ID {0}", landLocalId);
|
MainConsole.Instance.Output("No parcel found with local ID {0}", null, landLocalId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
56
OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
Normal file → Executable file
56
OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs
Normal file → Executable file
|
@ -235,7 +235,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
sb.AppendFormat("{0} object(s) found in {1}\n", sceneObjects.Count, m_scene.Name);
|
sb.AppendFormat("{0} object(s) found in {1}\n", sceneObjects.Count, m_scene.Name);
|
||||||
|
|
||||||
m_console.OutputFormat(sb.ToString());
|
m_console.Output(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OutputSopsToConsole(Predicate<SceneObjectPart> searchPredicate, bool showFull)
|
private void OutputSopsToConsole(Predicate<SceneObjectPart> searchPredicate, bool showFull)
|
||||||
|
@ -255,7 +255,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
sb.AppendFormat("{0} parts found in {1}\n", parts.Count, m_scene.Name);
|
sb.AppendFormat("{0} parts found in {1}\n", parts.Count, m_scene.Name);
|
||||||
|
|
||||||
m_console.OutputFormat(sb.ToString());
|
m_console.Output(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShowObjectById(string module, string[] cmdparams)
|
private void HandleShowObjectById(string module, string[] cmdparams)
|
||||||
|
@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (mainParams.Count < 4)
|
if (mainParams.Count < 4)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: show object uuid <uuid>");
|
m_console.Output("Usage: show object uuid <uuid>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
AddSceneObjectReport(sb, so, showFull);
|
AddSceneObjectReport(sb, so, showFull);
|
||||||
|
|
||||||
m_console.OutputFormat(sb.ToString());
|
m_console.Output(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShowObjectByName(string module, string[] cmdparams)
|
private void HandleShowObjectByName(string module, string[] cmdparams)
|
||||||
|
@ -313,7 +313,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (mainParams.Count < 4)
|
if (mainParams.Count < 4)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: show object name [--full] [--regex] <name>");
|
m_console.Output("Usage: show object name [--full] [--regex] <name>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (mainParams.Count < 4)
|
if (mainParams.Count < 4)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: show object owner <OwnerID>");
|
m_console.Output("Usage: show object owner <OwnerID>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (mainParams.Count < 5)
|
if (mainParams.Count < 5)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: show object pos [--full] <start-coord> to <end-coord>");
|
m_console.Output("Usage: show object pos [--full] <start-coord> to <end-coord>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
if (mainParams.Count < 4)
|
if (mainParams.Count < 4)
|
||||||
{
|
{
|
||||||
//m_console.OutputFormat("Usage: show part id [--full] <UUID-or-localID>");
|
//m_console.OutputFormat("Usage: show part id [--full] <UUID-or-localID>");
|
||||||
m_console.OutputFormat("Usage: show part id <UUID-or-localID>");
|
m_console.Output("Usage: show part id <UUID-or-localID>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
AddScenePartReport(sb, sop, true);
|
AddScenePartReport(sb, sop, true);
|
||||||
|
|
||||||
m_console.OutputFormat(sb.ToString());
|
m_console.Output(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShowPartByPos(string module, string[] cmdparams)
|
private void HandleShowPartByPos(string module, string[] cmdparams)
|
||||||
|
@ -442,7 +442,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
if (mainParams.Count < 5)
|
if (mainParams.Count < 5)
|
||||||
{
|
{
|
||||||
//m_console.OutputFormat("Usage: show part pos <start-coord> to <end-coord>");
|
//m_console.OutputFormat("Usage: show part pos <start-coord> to <end-coord>");
|
||||||
m_console.OutputFormat("Usage: show part pos [--full] <start-coord> to <end-coord>");
|
m_console.Output("Usage: show part pos [--full] <start-coord> to <end-coord>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector))
|
if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector))
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector);
|
m_console.Output("Error: Start vector '{0}' does not have a valid format", null, rawConsoleStartVector);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector))
|
if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector))
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector);
|
m_console.Output("Error: End vector '{0}' does not have a valid format", null, rawConsoleEndVector);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,7 +482,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (mainParams.Count < 4)
|
if (mainParams.Count < 4)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: show part name [--regex] <name>");
|
m_console.Output("Usage: show part name [--regex] <name>");
|
||||||
//m_console.OutputFormat("Usage: show part name [--full] [--regex] <name>");
|
//m_console.OutputFormat("Usage: show part name [--full] [--regex] <name>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -511,7 +511,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (cmdparams.Length < 4)
|
if (cmdparams.Length < 4)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: dump object id <UUID-or-localID>");
|
m_console.Output("Usage: dump object id <UUID-or-localID>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
SceneObjectSerializer.ToOriginalXmlFormat(so, xtw, true);
|
SceneObjectSerializer.ToOriginalXmlFormat(so, xtw, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_console.OutputFormat("Object dumped to file {0}", fileName);
|
m_console.Output("Object dumped to file {0}", fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -809,7 +809,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
if(so.IsAttachment)
|
if(so.IsAttachment)
|
||||||
{
|
{
|
||||||
requireConfirmation = true;
|
requireConfirmation = true;
|
||||||
m_console.OutputFormat("Warning: object with uuid {0} is a attachment", uuid);
|
m_console.Output("Warning: object with uuid {0} is a attachment", null, uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -844,7 +844,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
});
|
});
|
||||||
|
|
||||||
if (deletes.Count == 0)
|
if (deletes.Count == 0)
|
||||||
m_console.OutputFormat("No objects were found outside region bounds");
|
m_console.Output("No objects were found outside region bounds");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -853,7 +853,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m_console.OutputFormat("Unrecognized mode {0}", mode);
|
m_console.Output("Unrecognized mode {0}", null, mode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,7 +862,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (requireConfirmation)
|
if (requireConfirmation)
|
||||||
{
|
{
|
||||||
string response = MainConsole.Instance.CmdPrompt(
|
string response = MainConsole.Instance.Prompt(
|
||||||
string.Format(
|
string.Format(
|
||||||
"Are you sure that you want to delete {0} objects from {1}",
|
"Are you sure that you want to delete {0} objects from {1}",
|
||||||
deletes.Count, m_scene.RegionInfo.RegionName),
|
deletes.Count, m_scene.RegionInfo.RegionName),
|
||||||
|
@ -870,18 +870,18 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (response.ToLower() != "y")
|
if (response.ToLower() != "y")
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Aborting delete of {0} objects from {1}", deletes.Count, m_scene.RegionInfo.RegionName);
|
"Aborting delete of {0} objects from {1}", null, deletes.Count, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_console.OutputFormat("Deleting {0} objects in {1}", deletes.Count, m_scene.RegionInfo.RegionName);
|
m_console.Output("Deleting {0} objects in {1}", null, deletes.Count, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
foreach (SceneObjectGroup g in deletes)
|
foreach (SceneObjectGroup g in deletes)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Deleting object {0} {1}", g.UUID, g.Name);
|
m_console.Output("Deleting object {0} {1}", null, g.UUID, g.Name);
|
||||||
m_scene.DeleteSceneObject(g, false);
|
m_scene.DeleteSceneObject(g, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -895,7 +895,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (mainParams.Count < 4)
|
if (mainParams.Count < 4)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: delete object name [--regex] <name>");
|
m_console.Output("Usage: delete object name [--regex] <name>");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -917,7 +917,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
m_scene.ForEachSOG(searchAction);
|
m_scene.ForEachSOG(searchAction);
|
||||||
|
|
||||||
if (sceneObjects.Count == 0)
|
if (sceneObjects.Count == 0)
|
||||||
m_console.OutputFormat("No objects with name {0} found in {1}", name, m_scene.RegionInfo.RegionName);
|
m_console.Output("No objects with name {0} found in {1}", null, name, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
return sceneObjects;
|
return sceneObjects;
|
||||||
}
|
}
|
||||||
|
@ -933,7 +933,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
{
|
{
|
||||||
if (cmdparams.Length < 5)
|
if (cmdparams.Length < 5)
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Usage: delete object pos <start-coord> to <end-coord>");
|
m_console.Output("Usage: delete object pos <start-coord> to <end-coord>");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -952,7 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector))
|
if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector))
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector);
|
m_console.Output("Error: Start vector '{0}' does not have a valid format", null, rawConsoleStartVector);
|
||||||
endVector = Vector3.Zero;
|
endVector = Vector3.Zero;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -962,7 +962,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector))
|
if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector))
|
||||||
{
|
{
|
||||||
m_console.OutputFormat("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector);
|
m_console.Output("Error: End vector '{0}' does not have a valid format", null, rawConsoleEndVector);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (args.Length != 4)
|
if (args.Length != 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: region set <param> <value>");
|
MainConsole.Instance.Output("Usage: region set <param> <value>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,16 +224,17 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
if (newValue > ri.AgentCapacity)
|
if (newValue > ri.AgentCapacity)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit",
|
"Cannot set {0} to {1} in {2} as max-agent-limit is {3}", "agent-limit",
|
||||||
|
null,
|
||||||
newValue, m_scene.Name, ri.AgentCapacity);
|
newValue, m_scene.Name, ri.AgentCapacity);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rs.AgentLimit = newValue;
|
rs.AgentLimit = newValue;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"{0} set to {1} in {2}", "agent-limit", newValue, m_scene.Name);
|
"{0} set to {1} in {2}", "agent-limit", null, newValue, m_scene.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
rs.Save();
|
rs.Save();
|
||||||
|
@ -247,15 +248,15 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
|
||||||
|
|
||||||
ri.AgentCapacity = newValue;
|
ri.AgentCapacity = newValue;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"{0} set to {1} in {2}", "max-agent-limit", newValue, m_scene.Name);
|
"{0} set to {1} in {2}", "max-agent-limit", null, newValue, m_scene.Name);
|
||||||
|
|
||||||
if (ri.AgentCapacity < rs.AgentLimit)
|
if (ri.AgentCapacity < rs.AgentLimit)
|
||||||
{
|
{
|
||||||
rs.AgentLimit = ri.AgentCapacity;
|
rs.AgentLimit = ri.AgentCapacity;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Reducing {0} to {1} in {2}", "agent-limit", rs.AgentLimit, m_scene.Name);
|
"Reducing {0} to {1} in {2}", null, "agent-limit", rs.AgentLimit, m_scene.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
rs.Save();
|
rs.Save();
|
||||||
|
|
|
@ -337,8 +337,8 @@ namespace OpenSim.Region.CoreModules.World.Region
|
||||||
for (int i = 4 ; i < args.Length ; i++)
|
for (int i = 4 ; i < args.Length ; i++)
|
||||||
times.Add(Convert.ToInt32(args[i]));
|
times.Add(Convert.ToInt32(args[i]));
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Region {0} scheduled for restart in {1} seconds", m_Scene.Name, times.Sum());
|
"Region {0} scheduled for restart in {1} seconds", null, m_Scene.Name, times.Sum());
|
||||||
|
|
||||||
ScheduleRestart(UUID.Zero, args[3], times.ToArray(), notice);
|
ScheduleRestart(UUID.Zero, args[3], times.ToArray(), notice);
|
||||||
}
|
}
|
||||||
|
|
|
@ -791,8 +791,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
|
|
||||||
if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight)
|
if (offsetX < 0 || offsetX >= fileWidth || offsetY < 0 || offsetY >= fileHeight)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"ERROR: file width + minimum X tile and file height + minimum Y tile must incorporate the current region at ({0},{1}). File width {2} from {3} and file height {4} from {5} does not.",
|
"ERROR: file width + minimum X tile and file height + minimum Y tile must incorporate the current region at ({0},{1}). File width {2} from {3} and file height {4} from {5} does not.",
|
||||||
|
null,
|
||||||
m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
|
m_scene.RegionInfo.RegionLocX, m_scene.RegionInfo.RegionLocY, fileWidth, fileStartX, fileHeight, fileStartY);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -810,8 +811,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
(int)m_scene.RegionInfo.RegionSizeX,
|
(int)m_scene.RegionInfo.RegionSizeX,
|
||||||
(int)m_scene.RegionInfo.RegionSizeY);
|
(int)m_scene.RegionInfo.RegionSizeY);
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Saved terrain from ({0},{1}) to ({2},{3}) from {4} to {5}",
|
"Saved terrain from ({0},{1}) to ({2},{3}) from {4} to {5}",
|
||||||
|
null,
|
||||||
fileStartX, fileStartY, fileStartX + fileWidth - 1, fileStartY + fileHeight - 1,
|
fileStartX, fileStartY, fileStartX + fileWidth - 1, fileStartY + fileHeight - 1,
|
||||||
m_scene.RegionInfo.RegionName, filename);
|
m_scene.RegionInfo.RegionName, filename);
|
||||||
}
|
}
|
||||||
|
@ -820,8 +822,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"ERROR: Could not save terrain from {0} to {1}. Valid file extensions are {2}",
|
"ERROR: Could not save terrain from {0} to {1}. Valid file extensions are {2}",
|
||||||
|
null,
|
||||||
m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave);
|
m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1538,7 +1541,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: Unrecognised direction {0} - need x or y", direction);
|
MainConsole.Instance.Output("ERROR: Unrecognised direction {0} - need x or y", null, direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1703,8 +1706,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
|
|
||||||
double avg = sum / (m_channel.Height * m_channel.Width);
|
double avg = sum / (m_channel.Height * m_channel.Width);
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Channel {0}x{1}", m_channel.Width, m_channel.Height);
|
MainConsole.Instance.Output("Channel {0}x{1}", null, m_channel.Width, m_channel.Height);
|
||||||
MainConsole.Instance.OutputFormat("max/min/avg/sum: {0}/{1}/{2}/{3}", max, min, avg, sum);
|
MainConsole.Instance.Output("max/min/avg/sum: {0}/{1}/{2}/{3}", null, max, min, avg, sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InterfaceEnableExperimentalBrushes(Object[] args)
|
private void InterfaceEnableExperimentalBrushes(Object[] args)
|
||||||
|
|
|
@ -264,8 +264,8 @@ namespace OpenSim.Region.CoreModules
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Invalid value {0} specified for {1}", cmdparams[3], cmdparams[2]);
|
"Invalid value {0} specified for {1}", null, cmdparams[3], cmdparams[2]);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules
|
||||||
|
|
||||||
if (desiredPlugin.Equals(m_activeWindPlugin.Name))
|
if (desiredPlugin.Equals(m_activeWindPlugin.Name))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Wind model plugin {0} is already active", cmdparams[3]);
|
MainConsole.Instance.Output("Wind model plugin {0} is already active", null, cmdparams[3]);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -285,11 +285,11 @@ namespace OpenSim.Region.CoreModules
|
||||||
{
|
{
|
||||||
m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]];
|
m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]];
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("{0} wind model plugin now active", m_activeWindPlugin.Name);
|
MainConsole.Instance.Output("{0} wind model plugin now active", null, m_activeWindPlugin.Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Could not find wind model plugin {0}", desiredPlugin);
|
MainConsole.Instance.Output("Could not find wind model plugin {0}", null, desiredPlugin);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -317,17 +317,17 @@ namespace OpenSim.Region.CoreModules
|
||||||
{
|
{
|
||||||
if (!float.TryParse(cmdparams[3], out value))
|
if (!float.TryParse(cmdparams[3], out value))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Invalid value {0}", cmdparams[3]);
|
MainConsole.Instance.Output("Invalid value {0}", null, cmdparams[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WindParamSet(plugin, param, value);
|
WindParamSet(plugin, param, value);
|
||||||
MainConsole.Instance.OutputFormat("{0} set to {1}", param, value);
|
MainConsole.Instance.Output("{0} set to {1}", null, param, value);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0}", e.Message);
|
MainConsole.Instance.Output("{0}", null, e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -335,11 +335,11 @@ namespace OpenSim.Region.CoreModules
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
value = WindParamGet(plugin, param);
|
value = WindParamGet(plugin, param);
|
||||||
MainConsole.Instance.OutputFormat("{0} : {1}", param, value);
|
MainConsole.Instance.Output("{0} : {1}", null, param, value);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0}", e.Message);
|
MainConsole.Instance.Output("{0}", null, e.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ using OpenSim.Framework;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
{
|
{
|
||||||
public delegate void ReportOutputAction(string format, params object[] args);
|
public delegate void ReportOutputAction(string format, string level, params object[] args);
|
||||||
|
|
||||||
public interface IAvatarFactoryModule
|
public interface IAvatarFactoryModule
|
||||||
{
|
{
|
||||||
|
|
13
OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
Normal file → Executable file
13
OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs
Normal file → Executable file
|
@ -114,27 +114,27 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
|
||||||
|
|
||||||
if (!UUID.TryParse(rawAssetId, out assetId))
|
if (!UUID.TryParse(rawAssetId, out assetId))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
|
MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", null, rawAssetId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
|
AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
|
||||||
if (asset == null)
|
if (asset == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
|
MainConsole.Instance.Output("ERROR: No asset found with ID {0}", null, assetId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asset.Type != (sbyte)AssetType.Texture)
|
if (asset.Type != (sbyte)AssetType.Texture)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: Asset {0} is not a texture type", assetId);
|
MainConsole.Instance.Output("ERROR: Asset {0} is not a texture type", null, assetId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IJ2KDecoder decoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
|
IJ2KDecoder decoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
|
||||||
if (decoder == null)
|
if (decoder == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: No IJ2KDecoder module available");
|
MainConsole.Instance.Output("ERROR: No IJ2KDecoder module available");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,13 +142,14 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender
|
||||||
int components;
|
int components;
|
||||||
if (decoder.Decode(assetId, asset.Data, out layers, out components))
|
if (decoder.Decode(assetId, asset.Data, out layers, out components))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Successfully decoded asset {0} with {1} layers and {2} components",
|
"Successfully decoded asset {0} with {1} layers and {2} components",
|
||||||
|
null,
|
||||||
assetId, layers.Length, components);
|
assetId, layers.Length, components);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId);
|
MainConsole.Instance.Output("Decode of asset {0} failed", null, assetId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,14 +115,14 @@ namespace OpenSim.Region.OptionalModules.Asset
|
||||||
|
|
||||||
if (!UUID.TryParse(rawAssetId, out assetId))
|
if (!UUID.TryParse(rawAssetId, out assetId))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
|
MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", null, rawAssetId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
|
AssetBase asset = m_scene.AssetService.Get(assetId.ToString());
|
||||||
if (asset == null)
|
if (asset == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
|
MainConsole.Instance.Output("ERROR: No asset found with ID {0}", null, assetId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.Asset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName);
|
MainConsole.Instance.Output("Asset dumped to file {0}", null, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleShowAsset(string module, string[] args)
|
void HandleShowAsset(string module, string[] args)
|
||||||
|
@ -160,13 +160,13 @@ namespace OpenSim.Region.OptionalModules.Asset
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Name: {0}", asset.Name);
|
MainConsole.Instance.Output("Name: {0}", null, asset.Name);
|
||||||
MainConsole.Instance.OutputFormat("Description: {0}", asset.Description);
|
MainConsole.Instance.Output("Description: {0}", null, asset.Description);
|
||||||
MainConsole.Instance.OutputFormat("Type: {0} (type number = {1})", (AssetType)asset.Type, asset.Type);
|
MainConsole.Instance.Output("Type: {0} (type number = {1})", null, (AssetType)asset.Type, asset.Type);
|
||||||
MainConsole.Instance.OutputFormat("Content-type: {0}", asset.Metadata.ContentType);
|
MainConsole.Instance.Output("Content-type: {0}", null, asset.Metadata.ContentType);
|
||||||
MainConsole.Instance.OutputFormat("Size: {0} bytes", asset.Data.Length);
|
MainConsole.Instance.Output("Size: {0} bytes", null, asset.Data.Length);
|
||||||
MainConsole.Instance.OutputFormat("Temporary: {0}", asset.Temporary ? "yes" : "no");
|
MainConsole.Instance.Output("Temporary: {0}", null, asset.Temporary ? "yes" : "no");
|
||||||
MainConsole.Instance.OutputFormat("Flags: {0}", asset.Metadata.Flags);
|
MainConsole.Instance.Output("Flags: {0}", null, asset.Metadata.Flags);
|
||||||
|
|
||||||
for (i = 0 ; i < 5 ; i++)
|
for (i = 0 ; i < 5 ; i++)
|
||||||
{
|
{
|
||||||
|
|
2
OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
Normal file → Executable file
2
OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs
Normal file → Executable file
|
@ -109,7 +109,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations
|
||||||
{
|
{
|
||||||
if (cmd.Length != 2 && cmd.Length < 4)
|
if (cmd.Length != 2 && cmd.Length < 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: show animations [<first-name> <last-name>]");
|
MainConsole.Instance.Output("Usage: show animations [<first-name> <last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
37
OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
Normal file → Executable file
37
OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
Normal file → Executable file
|
@ -154,7 +154,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
{
|
{
|
||||||
if (cmd.Length != 2 && cmd.Length < 4)
|
if (cmd.Length != 2 && cmd.Length < 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: appearance send [<first-name> <last-name>]");
|
MainConsole.Instance.Output("Usage: appearance send [<first-name> <last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,8 +178,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName);
|
ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName);
|
||||||
if (sp != null && !sp.IsChildAgent)
|
if (sp != null && !sp.IsChildAgent)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Sending appearance information for {0} to all other avatars in {1}",
|
"Sending appearance information for {0} to all other avatars in {1}",
|
||||||
|
null,
|
||||||
sp.Name, scene.RegionInfo.RegionName);
|
sp.Name, scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
scene.AvatarFactory.SendAppearance(sp.UUID);
|
scene.AvatarFactory.SendAppearance(sp.UUID);
|
||||||
|
@ -190,8 +191,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
scene.ForEachRootScenePresence(
|
scene.ForEachRootScenePresence(
|
||||||
sp =>
|
sp =>
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Sending appearance information for {0} to all other avatars in {1}",
|
"Sending appearance information for {0} to all other avatars in {1}",
|
||||||
|
null,
|
||||||
sp.Name, scene.RegionInfo.RegionName);
|
sp.Name, scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
scene.AvatarFactory.SendAppearance(sp.UUID);
|
scene.AvatarFactory.SendAppearance(sp.UUID);
|
||||||
|
@ -206,7 +208,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
{
|
{
|
||||||
if (cmd.Length != 2 && cmd.Length < 4)
|
if (cmd.Length != 2 && cmd.Length < 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: appearance show [<first-name> <last-name>]");
|
MainConsole.Instance.Output("Usage: appearance show [<first-name> <last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
{
|
{
|
||||||
ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName);
|
ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName);
|
||||||
if (sp != null && !sp.IsChildAgent)
|
if (sp != null && !sp.IsChildAgent)
|
||||||
scene.AvatarFactory.WriteBakedTexturesReport(sp, MainConsole.Instance.OutputFormat);
|
scene.AvatarFactory.WriteBakedTexturesReport(sp, MainConsole.Instance.Output);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -237,8 +239,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
sp =>
|
sp =>
|
||||||
{
|
{
|
||||||
bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp);
|
bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp);
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "incomplete");
|
"{0} baked appearance texture is {1}", null, sp.Name, bakedTextureValid ? "OK" : "incomplete");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -250,7 +252,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
{
|
{
|
||||||
if (cmd.Length != 4)
|
if (cmd.Length != 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: appearance rebake <first-name> <last-name>");
|
MainConsole.Instance.Output("Usage: appearance rebake <first-name> <last-name>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,12 +269,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
int rebakesRequested = scene.AvatarFactory.RequestRebake(sp, false);
|
int rebakesRequested = scene.AvatarFactory.RequestRebake(sp, false);
|
||||||
|
|
||||||
if (rebakesRequested > 0)
|
if (rebakesRequested > 0)
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Requesting rebake of {0} uploaded textures for {1} in {2}",
|
"Requesting rebake of {0} uploaded textures for {1} in {2}",
|
||||||
|
null,
|
||||||
rebakesRequested, sp.Name, scene.RegionInfo.RegionName);
|
rebakesRequested, sp.Name, scene.RegionInfo.RegionName);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"No texture IDs available for rebake request for {0} in {1}",
|
"No texture IDs available for rebake request for {0} in {1}",
|
||||||
|
null,
|
||||||
sp.Name, scene.RegionInfo.RegionName);
|
sp.Name, scene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -283,7 +287,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
{
|
{
|
||||||
if (cmd.Length != 3)
|
if (cmd.Length != 3)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: appearance find <uuid-or-start-of-uuid>");
|
MainConsole.Instance.Output("Usage: appearance find <uuid-or-start-of-uuid>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,12 +314,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
|
|
||||||
if (matchedAvatars.Count == 0)
|
if (matchedAvatars.Count == 0)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0} did not match any baked avatar textures in use", rawUuid);
|
MainConsole.Instance.Output("{0} did not match any baked avatar textures in use", null, rawUuid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"{0} matched {1}",
|
"{0} matched {1}",
|
||||||
|
null,
|
||||||
rawUuid,
|
rawUuid,
|
||||||
string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray()));
|
string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray()));
|
||||||
}
|
}
|
||||||
|
@ -325,7 +330,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
{
|
{
|
||||||
if (cmd.Length != 2 && cmd.Length < 4)
|
if (cmd.Length != 2 && cmd.Length < 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: wearables show [<first-name> <last-name>]");
|
MainConsole.Instance.Output("Usage: wearables show [<first-name> <last-name>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
{
|
{
|
||||||
if (cmd.Length != 4)
|
if (cmd.Length != 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: wearables check <first-name> <last-name>");
|
MainConsole.Instance.Output("Usage: wearables check <first-name> <last-name>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +415,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
AvatarWearable[] wearables = sp.Appearance.Wearables;
|
AvatarWearable[] wearables = sp.Appearance.Wearables;
|
||||||
if(wearables.Count() == 0)
|
if(wearables.Count() == 0)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("avatar has no wearables");
|
MainConsole.Instance.Output("avatar has no wearables");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
Normal file → Executable file
15
OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs
Normal file → Executable file
|
@ -122,7 +122,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
|
||||||
|
|
||||||
if (mainParams.Count != 4)
|
if (mainParams.Count != 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: friends show [--cache] <first-name> <last-name>");
|
MainConsole.Instance.Output("Usage: friends show [--cache] <first-name> <last-name>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
|
||||||
|
|
||||||
if (userId == UUID.Zero)
|
if (userId == UUID.Zero)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No such user as {0} {1}", firstName, lastName);
|
MainConsole.Instance.Output("No such user as {0} {1}", null, firstName, lastName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
|
||||||
{
|
{
|
||||||
if (!m_friendsModule.AreFriendsCached(userId))
|
if (!m_friendsModule.AreFriendsCached(userId))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No friends cached on this simulator for {0} {1}", firstName, lastName);
|
MainConsole.Instance.Output("No friends cached on this simulator for {0} {1}", null, firstName, lastName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -162,10 +162,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
|
||||||
friends = ((FriendsModule)m_friendsModule).FriendsService.GetFriends(userId);
|
friends = ((FriendsModule)m_friendsModule).FriendsService.GetFriends(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Friends for {0} {1} {2}:", firstName, lastName, userId);
|
MainConsole.Instance.Output("Friends for {0} {1} {2}:", null, firstName, lastName, userId);
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"{0,-36} {1,-36} {2,-7} {3,7} {4,10}", "UUID", "Name", "Status", "MyFlags", "TheirFlags");
|
"{0,-36} {1,-36} {2,-7} {3,7} {4,10}", null, "UUID", "Name", "Status", "MyFlags", "TheirFlags");
|
||||||
|
|
||||||
foreach (FriendInfo friend in friends)
|
foreach (FriendInfo friend in friends)
|
||||||
{
|
{
|
||||||
|
@ -191,8 +191,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends
|
||||||
else
|
else
|
||||||
onlineText = "offline";
|
onlineText = "offline";
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"{0,-36} {1,-36} {2,-7} {3,-7} {4,-10}",
|
"{0,-36} {1,-36} {2,-7} {3,-7} {4,-10}",
|
||||||
|
null,
|
||||||
friend.Friend, friendName, onlineText, friend.MyFlags, friend.TheirFlags);
|
friend.Friend, friendName, onlineText, friend.MyFlags, friend.TheirFlags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
8
OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
Normal file → Executable file
8
OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs
Normal file → Executable file
|
@ -142,8 +142,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
|
||||||
|
|
||||||
if (sitPart != null)
|
if (sitPart != null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Sitting {0} on {1} {2} in {3}",
|
"Sitting {0} on {1} {2} in {3}",
|
||||||
|
null,
|
||||||
sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name);
|
sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name);
|
||||||
|
|
||||||
sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero);
|
sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero);
|
||||||
|
@ -151,8 +152,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Could not find any unoccupied set seat on which to sit {0} in {1}. Aborting",
|
"Could not find any unoccupied set seat on which to sit {0} in {1}. Aborting",
|
||||||
|
null,
|
||||||
sp.Name, m_scene.Name);
|
sp.Name, m_scene.Name);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -177,7 +179,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand
|
||||||
{
|
{
|
||||||
if (sp.SitGround || sp.IsSatOnObject)
|
if (sp.SitGround || sp.IsSatOnObject)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Standing {0} in {1}", sp.Name, m_scene.Name);
|
MainConsole.Instance.Output("Standing {0} in {1}", null, sp.Name, m_scene.Name);
|
||||||
sp.StandUp();
|
sp.StandUp();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
Normal file → Executable file
2
OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
Normal file → Executable file
|
@ -243,7 +243,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
m_debugEnabled = verbose;
|
m_debugEnabled = verbose;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
|
MainConsole.Instance.Output("{0} verbose logging set to {1}", null, Name, m_debugEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -154,7 +154,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
m_debugEnabled = verbose;
|
m_debugEnabled = verbose;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("{0} verbose logging set to {1}", Name, m_debugEnabled);
|
MainConsole.Instance.Output("{0} verbose logging set to {1}", null, Name, m_debugEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
public void RegionLoaded(Scene scene)
|
||||||
|
|
|
@ -256,13 +256,13 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters
|
||||||
private void WriteOut(string msg, params object[] args)
|
private void WriteOut(string msg, params object[] args)
|
||||||
{
|
{
|
||||||
// m_log.InfoFormat(msg, args);
|
// m_log.InfoFormat(msg, args);
|
||||||
MainConsole.Instance.OutputFormat(msg, args);
|
MainConsole.Instance.Output(msg, null, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WriteError(string msg, params object[] args)
|
private void WriteError(string msg, params object[] args)
|
||||||
{
|
{
|
||||||
// m_log.ErrorFormat(msg, args);
|
// m_log.ErrorFormat(msg, args);
|
||||||
MainConsole.Instance.OutputFormat(msg, args);
|
MainConsole.Instance.Output(msg, null, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
Normal file → Executable file
2
OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs
Normal file → Executable file
|
@ -186,7 +186,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
|
||||||
return;
|
return;
|
||||||
|
|
||||||
JsonStoreStats stats = m_store.GetStoreStats();
|
JsonStoreStats stats = m_store.GetStoreStats();
|
||||||
MainConsole.Instance.OutputFormat("{0}\t{1}",m_scene.RegionInfo.RegionName,stats.StoreCount);
|
MainConsole.Instance.Output("{0}\t{1}", null, m_scene.RegionInfo.RegionName, stats.StoreCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
4
OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
Normal file → Executable file
4
OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs
Normal file → Executable file
|
@ -109,7 +109,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
// This should always show up to the user but should not trigger warn/errors as these messages are
|
// This should always show up to the user but should not trigger warn/errors as these messages are
|
||||||
// expected and are not simulator problems. Ideally, there would be a status level in log4net but
|
// expected and are not simulator problems. Ideally, there would be a status level in log4net but
|
||||||
// failing that, we will print out to console instead.
|
// failing that, we will print out to console instead.
|
||||||
MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name);
|
MainConsole.Instance.Output("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", null, m_scene.Name);
|
||||||
|
|
||||||
if (m_uri != string.Empty)
|
if (m_uri != string.Empty)
|
||||||
{
|
{
|
||||||
|
@ -232,7 +232,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady
|
||||||
// without info log messages enabled. Making this a warning is arguably misleading since it isn't a
|
// without info log messages enabled. Making this a warning is arguably misleading since it isn't a
|
||||||
// warning, and monitor scripts looking for warn/error/fatal messages will received false positives.
|
// warning, and monitor scripts looking for warn/error/fatal messages will received false positives.
|
||||||
// Arguably, log4net needs a status log level (like Apache).
|
// Arguably, log4net needs a status log level (like Apache).
|
||||||
MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name);
|
MainConsole.Instance.Output("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", null, m_scene.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_scene.SceneGridService.InformNeighborsThatRegionisUp(
|
m_scene.SceneGridService.InformNeighborsThatRegionisUp(
|
||||||
|
|
|
@ -271,13 +271,13 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||||
|
|
||||||
if (args.Length != 2)
|
if (args.Length != 2)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat ("Usage: dooarbackup <regionname>");
|
MainConsole.Instance.Output("Usage: dooarbackup <regionname>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_busy)
|
if(m_busy)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat ("Already doing a backup, please try later");
|
MainConsole.Instance.Output("Already doing a backup, please try later");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||||
m_busy = false;
|
m_busy = false;
|
||||||
}
|
}
|
||||||
if (!found)
|
if (!found)
|
||||||
MainConsole.Instance.OutputFormat ("No such region {0}. Nothing to backup", name);
|
MainConsole.Instance.Output("No such region {0}. Nothing to backup", null, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ParseDefaultConfig(IConfig config)
|
private void ParseDefaultConfig(IConfig config)
|
||||||
|
|
4
OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
Normal file → Executable file
4
OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
Normal file → Executable file
|
@ -145,7 +145,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
||||||
cdl.AddRow("teleport", m_scene.DebugTeleporting);
|
cdl.AddRow("teleport", m_scene.DebugTeleporting);
|
||||||
cdl.AddRow("updates", m_scene.DebugUpdates);
|
cdl.AddRow("updates", m_scene.DebugUpdates);
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Scene {0} options:", m_scene.Name);
|
MainConsole.Instance.Output("Scene {0} options:", null, m_scene.Name);
|
||||||
MainConsole.Instance.Output(cdl.ToString());
|
MainConsole.Instance.Output(cdl.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
||||||
string value = args[4];
|
string value = args[4];
|
||||||
SetSceneDebugOptions(new Dictionary<string, string>() { { key, value } });
|
SetSceneDebugOptions(new Dictionary<string, string>() { { key, value } });
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Set {0} debug scene {1} = {2}", m_scene.Name, key, value);
|
MainConsole.Instance.Output("Set {0} debug scene {1} = {2}", null, m_scene.Name, key, value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.Output(cdt.ToString());
|
MainConsole.Instance.Output(cdt.ToString());
|
||||||
MainConsole.Instance.OutputFormat("Total: {0}", sensorInfo.Count);
|
MainConsole.Instance.Output("Total: {0}", null, sensorInfo.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShowTimers(string module, string[] cmdparams)
|
private void HandleShowTimers(string module, string[] cmdparams)
|
||||||
|
@ -120,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.Output(cdt.ToString());
|
MainConsole.Instance.Output(cdt.ToString());
|
||||||
MainConsole.Instance.OutputFormat("Total: {0}", timersInfo.Count);
|
MainConsole.Instance.Output("Total: {0}", null, timersInfo.Count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -456,7 +456,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
}
|
}
|
||||||
|
|
||||||
si.DebugLevel = newLevel;
|
si.DebugLevel = newLevel;
|
||||||
MainConsole.Instance.OutputFormat("Set debug level of {0} {1} to {2}", si.ScriptName, si.ItemID, newLevel);
|
MainConsole.Instance.Output("Set debug level of {0} {1} to {2}", null, si.ScriptName, si.ItemID, newLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -472,12 +472,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, args[3], out newDebug))
|
if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, args[3], out newDebug))
|
||||||
{
|
{
|
||||||
DebugLevel = newDebug;
|
DebugLevel = newDebug;
|
||||||
MainConsole.Instance.OutputFormat("Debug level set to {0} in XEngine for region {1}", newDebug, m_Scene.Name);
|
MainConsole.Instance.Output("Debug level set to {0} in XEngine for region {1}", null, newDebug, m_Scene.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (args.Length == 3)
|
else if (args.Length == 3)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Current debug level is {0}", DebugLevel);
|
MainConsole.Instance.Output("Current debug level is {0}", null, DebugLevel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -532,7 +532,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
|
|
||||||
if (!UUID.TryParse(rawItemId, out itemId))
|
if (!UUID.TryParse(rawItemId, out itemId))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid UUID", rawItemId);
|
MainConsole.Instance.Output("ERROR: {0} is not a valid UUID", null, rawItemId);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,8 +617,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
{
|
{
|
||||||
lock (m_Scripts)
|
lock (m_Scripts)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Showing {0} scripts in {1}", m_Scripts.Count, m_Scene.RegionInfo.RegionName);
|
"Showing {0} scripts in {1}", null, m_Scripts.Count, m_Scene.RegionInfo.RegionName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -669,8 +669,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
instance.Suspend();
|
instance.Suspend();
|
||||||
|
|
||||||
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Suspended {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
"Suspended {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
||||||
|
null,
|
||||||
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -682,8 +683,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
instance.Resume();
|
instance.Resume();
|
||||||
|
|
||||||
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Resumed {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
"Resumed {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
||||||
|
null,
|
||||||
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -695,8 +697,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
instance.Start();
|
instance.Start();
|
||||||
|
|
||||||
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Started {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
"Started {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
||||||
|
null,
|
||||||
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -710,8 +713,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
instance.Stop(0);
|
instance.Stop(0);
|
||||||
|
|
||||||
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Stopped {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
"Stopped {0}.{1}, item UUID {2}, prim UUID {3} @ {4}",
|
||||||
|
null,
|
||||||
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, sop.AbsolutePosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,8 @@ namespace OpenSim.Server.Base
|
||||||
{
|
{
|
||||||
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
|
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
|
||||||
bool enabled = (bool)plugin["enabled"];
|
bool enabled = (bool)plugin["enabled"];
|
||||||
MainConsole.Instance.OutputFormat("{0}) {1} {2} rev. {3}",
|
MainConsole.Instance.Output("{0}) {1} {2} rev. {3}",
|
||||||
|
null,
|
||||||
k,
|
k,
|
||||||
enabled == true ? "[ ]" : "[X]",
|
enabled == true ? "[ ]" : "[X]",
|
||||||
plugin["name"], plugin["version"]);
|
plugin["name"], plugin["version"]);
|
||||||
|
@ -215,7 +216,8 @@ namespace OpenSim.Server.Base
|
||||||
{
|
{
|
||||||
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
|
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
|
||||||
bool enabled = (bool)plugin["enabled"];
|
bool enabled = (bool)plugin["enabled"];
|
||||||
MainConsole.Instance.OutputFormat("{0}) {1} {2} rev. {3}",
|
MainConsole.Instance.Output("{0}) {1} {2} rev. {3}",
|
||||||
|
null,
|
||||||
k,
|
k,
|
||||||
enabled == true ? "[ ]" : "[X]",
|
enabled == true ? "[ ]" : "[X]",
|
||||||
plugin["name"], plugin["version"]);
|
plugin["name"], plugin["version"]);
|
||||||
|
@ -235,7 +237,8 @@ namespace OpenSim.Server.Base
|
||||||
{
|
{
|
||||||
// name, version, repository
|
// name, version, repository
|
||||||
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
|
Dictionary<string, object> plugin = (Dictionary<string, object>)result[k];
|
||||||
MainConsole.Instance.OutputFormat("{0}) {1} rev. {2} {3}",
|
MainConsole.Instance.Output("{0}) {1} rev. {2} {3}",
|
||||||
|
null,
|
||||||
k,
|
k,
|
||||||
plugin["name"],
|
plugin["name"],
|
||||||
plugin["version"],
|
plugin["version"],
|
||||||
|
@ -309,7 +312,8 @@ namespace OpenSim.Server.Base
|
||||||
{
|
{
|
||||||
Dictionary<string, object> repo = (Dictionary<string, object>)result[k];
|
Dictionary<string, object> repo = (Dictionary<string, object>)result[k];
|
||||||
bool enabled = (bool)repo["enabled"];
|
bool enabled = (bool)repo["enabled"];
|
||||||
MainConsole.Instance.OutputFormat("{0}) {1} {2}",
|
MainConsole.Instance.Output("{0}) {1} {2}",
|
||||||
|
null,
|
||||||
k,
|
k,
|
||||||
enabled == true ? "[ ]" : "[X]",
|
enabled == true ? "[ ]" : "[X]",
|
||||||
repo["name"], repo["url"]);
|
repo["name"], repo["url"]);
|
||||||
|
@ -329,7 +333,8 @@ namespace OpenSim.Server.Base
|
||||||
int ndx = Convert.ToInt16(cmd[2]);
|
int ndx = Convert.ToInt16(cmd[2]);
|
||||||
PluginManager.AddinInfo(ndx, out result);
|
PluginManager.AddinInfo(ndx, out result);
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Name: {0}\nURL: {1}\nFile: {2}\nAuthor: {3}\nCategory: {4}\nDesc: {5}",
|
MainConsole.Instance.Output("Name: {0}\nURL: {1}\nFile: {2}\nAuthor: {3}\nCategory: {4}\nDesc: {5}",
|
||||||
|
null,
|
||||||
result["name"],
|
result["name"],
|
||||||
result["url"],
|
result["url"],
|
||||||
result["file_name"],
|
result["file_name"],
|
||||||
|
|
|
@ -125,14 +125,14 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
|
|
||||||
if (asset == null || asset.Data.Length == 0)
|
if (asset == null || asset.Data.Length == 0)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Could not find asset with ID {0}", args[2]);
|
MainConsole.Instance.Output("Could not find asset with ID {0}", null, args[2]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_AssetService.Delete(asset.ID))
|
if (!m_AssetService.Delete(asset.ID))
|
||||||
MainConsole.Instance.OutputFormat("ERROR: Could not delete asset {0} {1}", asset.ID, asset.Name);
|
MainConsole.Instance.Output("ERROR: Could not delete asset {0} {1}", null, asset.ID, asset.Name);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.OutputFormat("Deleted asset {0} {1}", asset.ID, asset.Name);
|
MainConsole.Instance.Output("Deleted asset {0} {1}", null, asset.ID, asset.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleDumpAsset(string module, string[] args)
|
void HandleDumpAsset(string module, string[] args)
|
||||||
|
@ -148,14 +148,14 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
|
|
||||||
if (!UUID.TryParse(rawAssetId, out assetId))
|
if (!UUID.TryParse(rawAssetId, out assetId))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId);
|
MainConsole.Instance.Output("ERROR: {0} is not a valid ID format", null, rawAssetId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AssetBase asset = m_AssetService.Get(assetId.ToString());
|
AssetBase asset = m_AssetService.Get(assetId.ToString());
|
||||||
if (asset == null)
|
if (asset == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId);
|
MainConsole.Instance.Output("ERROR: No asset found with ID {0}", null, assetId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName);
|
MainConsole.Instance.Output("Asset dumped to file {0}", null, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleShowAsset(string module, string[] args)
|
void HandleShowAsset(string module, string[] args)
|
||||||
|
@ -193,13 +193,13 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Name: {0}", asset.Name);
|
MainConsole.Instance.Output("Name: {0}", null, asset.Name);
|
||||||
MainConsole.Instance.OutputFormat("Description: {0}", asset.Description);
|
MainConsole.Instance.Output("Description: {0}", null, asset.Description);
|
||||||
MainConsole.Instance.OutputFormat("Type: {0} (type number = {1})", (AssetType)asset.Type, asset.Type);
|
MainConsole.Instance.Output("Type: {0} (type number = {1})", null, (AssetType)asset.Type, asset.Type);
|
||||||
MainConsole.Instance.OutputFormat("Content-type: {0}", asset.Metadata.ContentType);
|
MainConsole.Instance.Output("Content-type: {0}", null, asset.Metadata.ContentType);
|
||||||
MainConsole.Instance.OutputFormat("Size: {0} bytes", asset.Data.Length);
|
MainConsole.Instance.Output("Size: {0} bytes", null, asset.Data.Length);
|
||||||
MainConsole.Instance.OutputFormat("Temporary: {0}", asset.Temporary ? "yes" : "no");
|
MainConsole.Instance.Output("Temporary: {0}", null, asset.Temporary ? "yes" : "no");
|
||||||
MainConsole.Instance.OutputFormat("Flags: {0}", asset.Metadata.Flags);
|
MainConsole.Instance.Output("Flags: {0}", null, asset.Metadata.Flags);
|
||||||
|
|
||||||
for (i = 0 ; i < 5 ; i++)
|
for (i = 0 ; i < 5 ; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -772,7 +772,7 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
if (!UUID.TryParse(rawRegionUuid, out regionUuid))
|
if (!UUID.TryParse(rawRegionUuid, out regionUuid))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("{0} is not a valid region uuid", rawRegionUuid);
|
MainConsole.Instance.Output("{0} is not a valid region uuid", null, rawRegionUuid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,18 +780,18 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
if (region == null)
|
if (region == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No region with UUID {0}", regionUuid);
|
MainConsole.Instance.Output("No region with UUID {0}", null, regionUuid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DeregisterRegion(regionUuid))
|
if (DeregisterRegion(regionUuid))
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Deregistered {0} {1}", region.RegionName, regionUuid);
|
MainConsole.Instance.Output("Deregistered {0} {1}", null, region.RegionName, regionUuid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// I don't think this can ever occur if we know that the region exists.
|
// I don't think this can ever occur if we know that the region exists.
|
||||||
MainConsole.Instance.OutputFormat("Error deregistering {0} {1}", region.RegionName, regionUuid);
|
MainConsole.Instance.Output("Error deregistering {0} {1}", null, region.RegionName, regionUuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -828,7 +828,7 @@ namespace OpenSim.Services.GridService
|
||||||
MainConsole.Instance.Output("it will count regions that are inactive but were not deregistered from the grid service");
|
MainConsole.Instance.Output("it will count regions that are inactive but were not deregistered from the grid service");
|
||||||
MainConsole.Instance.Output("(e.g. simulator crashed rather than shutting down cleanly).\n");
|
MainConsole.Instance.Output("(e.g. simulator crashed rather than shutting down cleanly).\n");
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Grid size: {0} km squared.", size / 1000000);
|
MainConsole.Instance.Output("Grid size: {0} km squared.", null, size / 1000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShowRegion(string module, string[] cmd)
|
private void HandleShowRegion(string module, string[] cmd)
|
||||||
|
@ -877,7 +877,7 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
if (region == null)
|
if (region == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y);
|
MainConsole.Instance.Output("No region found at {0},{1}", null, x, y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1122,22 +1122,22 @@ namespace OpenSim.Services.LLLoginService
|
||||||
if (cmd.Length > 2)
|
if (cmd.Length > 2)
|
||||||
{
|
{
|
||||||
if (Int32.TryParse(cmd[2], out m_MinLoginLevel))
|
if (Int32.TryParse(cmd[2], out m_MinLoginLevel))
|
||||||
MainConsole.Instance.OutputFormat("Set minimum login level to {0}", m_MinLoginLevel);
|
MainConsole.Instance.Output("Set minimum login level to {0}", null, m_MinLoginLevel);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid login level", cmd[2]);
|
MainConsole.Instance.Output("ERROR: {0} is not a valid login level", null, cmd[2]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "reset":
|
case "reset":
|
||||||
m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0);
|
m_MinLoginLevel = m_LoginServerConfig.GetInt("MinLoginLevel", 0);
|
||||||
MainConsole.Instance.OutputFormat("Reset min login level to {0}", m_MinLoginLevel);
|
MainConsole.Instance.Output("Reset min login level to {0}", null, m_MinLoginLevel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "text":
|
case "text":
|
||||||
if (cmd.Length > 2)
|
if (cmd.Length > 2)
|
||||||
{
|
{
|
||||||
m_WelcomeMessage = cmd[2];
|
m_WelcomeMessage = cmd[2];
|
||||||
MainConsole.Instance.OutputFormat("Login welcome message set to '{0}'", m_WelcomeMessage);
|
MainConsole.Instance.Output("Login welcome message set to '{0}'", null, m_WelcomeMessage);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ namespace OpenSim.Services.UserAccountService
|
||||||
MainConsole.Instance.Output(cdl.ToString());
|
MainConsole.Instance.Output(cdl.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Entries: {0}", data.Length);
|
MainConsole.Instance.Output("Entries: {0}", null, data.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void HandleShowGridUsersOnline(string module, string[] cmdparams)
|
protected void HandleShowGridUsersOnline(string module, string[] cmdparams)
|
||||||
|
@ -123,7 +123,7 @@ namespace OpenSim.Services.UserAccountService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Users online: {0}", onlineRecentlyCount);
|
MainConsole.Instance.Output("Users online: {0}", null, onlineRecentlyCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
private GridUserData GetGridUserData(string userID)
|
private GridUserData GetGridUserData(string userID)
|
||||||
|
|
|
@ -385,28 +385,28 @@ namespace OpenSim.Services.UserAccountService
|
||||||
// List<char> excluded = new List<char>(new char[]{' '});
|
// List<char> excluded = new List<char>(new char[]{' '});
|
||||||
List<char> excluded = new List<char>(new char[]{' ', '@', '.', ':' }); //Protect user names from using valid HG identifiers.
|
List<char> excluded = new List<char>(new char[]{' ', '@', '.', ':' }); //Protect user names from using valid HG identifiers.
|
||||||
if (cmdparams.Length < 3)
|
if (cmdparams.Length < 3)
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name", "Default", excluded);
|
firstName = MainConsole.Instance.Prompt("First name", "Default", excluded);
|
||||||
else firstName = cmdparams[2];
|
else firstName = cmdparams[2];
|
||||||
|
|
||||||
if (cmdparams.Length < 4)
|
if (cmdparams.Length < 4)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name", "User", excluded);
|
lastName = MainConsole.Instance.Prompt("Last name", "User", excluded);
|
||||||
else lastName = cmdparams[3];
|
else lastName = cmdparams[3];
|
||||||
|
|
||||||
if (cmdparams.Length < 5)
|
if (cmdparams.Length < 5)
|
||||||
password = MainConsole.Instance.PasswdPrompt("Password");
|
password = MainConsole.Instance.Prompt("Password", null, null, false);
|
||||||
else password = cmdparams[4];
|
else password = cmdparams[4];
|
||||||
|
|
||||||
if (cmdparams.Length < 6)
|
if (cmdparams.Length < 6)
|
||||||
email = MainConsole.Instance.CmdPrompt("Email", "");
|
email = MainConsole.Instance.Prompt("Email", "");
|
||||||
else email = cmdparams[5];
|
else email = cmdparams[5];
|
||||||
|
|
||||||
if (cmdparams.Length < 7)
|
if (cmdparams.Length < 7)
|
||||||
rawPrincipalId = MainConsole.Instance.CmdPrompt("User ID (enter for random)", "");
|
rawPrincipalId = MainConsole.Instance.Prompt("User ID (enter for random)", "");
|
||||||
else
|
else
|
||||||
rawPrincipalId = cmdparams[6];
|
rawPrincipalId = cmdparams[6];
|
||||||
|
|
||||||
if (cmdparams.Length < 8)
|
if (cmdparams.Length < 8)
|
||||||
model = MainConsole.Instance.CmdPrompt("Model name","");
|
model = MainConsole.Instance.Prompt("Model name","");
|
||||||
else
|
else
|
||||||
model = cmdparams[7];
|
model = cmdparams[7];
|
||||||
|
|
||||||
|
@ -434,19 +434,19 @@ namespace OpenSim.Services.UserAccountService
|
||||||
|
|
||||||
if (ua == null)
|
if (ua == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No user named {0} {1}", firstName, lastName);
|
MainConsole.Instance.Output("No user named {0} {1}", null, firstName, lastName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Name: {0}", ua.Name);
|
MainConsole.Instance.Output("Name: {0}", null, ua.Name);
|
||||||
MainConsole.Instance.OutputFormat("ID: {0}", ua.PrincipalID);
|
MainConsole.Instance.Output("ID: {0}", null, ua.PrincipalID);
|
||||||
MainConsole.Instance.OutputFormat("Title: {0}", ua.UserTitle);
|
MainConsole.Instance.Output("Title: {0}", null, ua.UserTitle);
|
||||||
MainConsole.Instance.OutputFormat("E-mail: {0}", ua.Email);
|
MainConsole.Instance.Output("E-mail: {0}", null, ua.Email);
|
||||||
MainConsole.Instance.OutputFormat("Created: {0}", Utils.UnixTimeToDateTime(ua.Created));
|
MainConsole.Instance.Output("Created: {0}", null, Utils.UnixTimeToDateTime(ua.Created));
|
||||||
MainConsole.Instance.OutputFormat("Level: {0}", ua.UserLevel);
|
MainConsole.Instance.Output("Level: {0}", null, ua.UserLevel);
|
||||||
MainConsole.Instance.OutputFormat("Flags: {0}", ua.UserFlags);
|
MainConsole.Instance.Output("Flags: {0}", null, ua.UserFlags);
|
||||||
foreach (KeyValuePair<string, Object> kvp in ua.ServiceURLs)
|
foreach (KeyValuePair<string, Object> kvp in ua.ServiceURLs)
|
||||||
MainConsole.Instance.OutputFormat("{0}: {1}", kvp.Key, kvp.Value);
|
MainConsole.Instance.Output("{0}: {1}", null, kvp.Key, kvp.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void HandleResetUserPassword(string module, string[] cmdparams)
|
protected void HandleResetUserPassword(string module, string[] cmdparams)
|
||||||
|
@ -456,21 +456,21 @@ namespace OpenSim.Services.UserAccountService
|
||||||
string newPassword;
|
string newPassword;
|
||||||
|
|
||||||
if (cmdparams.Length < 4)
|
if (cmdparams.Length < 4)
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name");
|
firstName = MainConsole.Instance.Prompt("First name");
|
||||||
else firstName = cmdparams[3];
|
else firstName = cmdparams[3];
|
||||||
|
|
||||||
if (cmdparams.Length < 5)
|
if (cmdparams.Length < 5)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
lastName = MainConsole.Instance.Prompt("Last name");
|
||||||
else lastName = cmdparams[4];
|
else lastName = cmdparams[4];
|
||||||
|
|
||||||
if (cmdparams.Length < 6)
|
if (cmdparams.Length < 6)
|
||||||
newPassword = MainConsole.Instance.PasswdPrompt("New password");
|
newPassword = MainConsole.Instance.Prompt("New password", null, null, false);
|
||||||
else newPassword = cmdparams[5];
|
else newPassword = cmdparams[5];
|
||||||
|
|
||||||
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
|
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
|
||||||
if (account == null)
|
if (account == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No such user as {0} {1}", firstName, lastName);
|
MainConsole.Instance.Output("No such user as {0} {1}", null, firstName, lastName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -479,9 +479,9 @@ namespace OpenSim.Services.UserAccountService
|
||||||
success = m_AuthenticationService.SetPassword(account.PrincipalID, newPassword);
|
success = m_AuthenticationService.SetPassword(account.PrincipalID, newPassword);
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
MainConsole.Instance.OutputFormat("Unable to reset password for account {0} {1}.", firstName, lastName);
|
MainConsole.Instance.Output("Unable to reset password for account {0} {1}.", null, firstName, lastName);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.OutputFormat("Password reset for user {0} {1}", firstName, lastName);
|
MainConsole.Instance.Output("Password reset for user {0} {1}", null, firstName, lastName);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void HandleResetUserEmail(string module, string[] cmdparams)
|
protected void HandleResetUserEmail(string module, string[] cmdparams)
|
||||||
|
@ -491,21 +491,21 @@ namespace OpenSim.Services.UserAccountService
|
||||||
string newEmail;
|
string newEmail;
|
||||||
|
|
||||||
if (cmdparams.Length < 4)
|
if (cmdparams.Length < 4)
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name");
|
firstName = MainConsole.Instance.Prompt("First name");
|
||||||
else firstName = cmdparams[3];
|
else firstName = cmdparams[3];
|
||||||
|
|
||||||
if (cmdparams.Length < 5)
|
if (cmdparams.Length < 5)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
lastName = MainConsole.Instance.Prompt("Last name");
|
||||||
else lastName = cmdparams[4];
|
else lastName = cmdparams[4];
|
||||||
|
|
||||||
if (cmdparams.Length < 6)
|
if (cmdparams.Length < 6)
|
||||||
newEmail = MainConsole.Instance.PasswdPrompt("New Email");
|
newEmail = MainConsole.Instance.Prompt("New Email");
|
||||||
else newEmail = cmdparams[5];
|
else newEmail = cmdparams[5];
|
||||||
|
|
||||||
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
|
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
|
||||||
if (account == null)
|
if (account == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No such user as {0} {1}", firstName, lastName);
|
MainConsole.Instance.Output("No such user as {0} {1}", null, firstName, lastName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,9 +515,9 @@ namespace OpenSim.Services.UserAccountService
|
||||||
|
|
||||||
success = StoreUserAccount(account);
|
success = StoreUserAccount(account);
|
||||||
if (!success)
|
if (!success)
|
||||||
MainConsole.Instance.OutputFormat("Unable to set Email for account {0} {1}.", firstName, lastName);
|
MainConsole.Instance.Output("Unable to set Email for account {0} {1}.", null, firstName, lastName);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.OutputFormat("User Email set for user {0} {1} to {2}", firstName, lastName, account.Email);
|
MainConsole.Instance.Output("User Email set for user {0} {1} to {2}", null, firstName, lastName, account.Email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -529,25 +529,25 @@ namespace OpenSim.Services.UserAccountService
|
||||||
int level;
|
int level;
|
||||||
|
|
||||||
if (cmdparams.Length < 4)
|
if (cmdparams.Length < 4)
|
||||||
firstName = MainConsole.Instance.CmdPrompt("First name");
|
firstName = MainConsole.Instance.Prompt("First name");
|
||||||
else firstName = cmdparams[3];
|
else firstName = cmdparams[3];
|
||||||
|
|
||||||
if (cmdparams.Length < 5)
|
if (cmdparams.Length < 5)
|
||||||
lastName = MainConsole.Instance.CmdPrompt("Last name");
|
lastName = MainConsole.Instance.Prompt("Last name");
|
||||||
else lastName = cmdparams[4];
|
else lastName = cmdparams[4];
|
||||||
|
|
||||||
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
|
UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
|
||||||
if (account == null) {
|
if (account == null) {
|
||||||
MainConsole.Instance.OutputFormat("No such user");
|
MainConsole.Instance.Output("No such user");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmdparams.Length < 6)
|
if (cmdparams.Length < 6)
|
||||||
rawLevel = MainConsole.Instance.CmdPrompt("User level");
|
rawLevel = MainConsole.Instance.Prompt("User level");
|
||||||
else rawLevel = cmdparams[5];
|
else rawLevel = cmdparams[5];
|
||||||
|
|
||||||
if(int.TryParse(rawLevel, out level) == false) {
|
if(int.TryParse(rawLevel, out level) == false) {
|
||||||
MainConsole.Instance.OutputFormat("Invalid user level");
|
MainConsole.Instance.Output("Invalid user level");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,9 +555,9 @@ namespace OpenSim.Services.UserAccountService
|
||||||
|
|
||||||
bool success = StoreUserAccount(account);
|
bool success = StoreUserAccount(account);
|
||||||
if (!success)
|
if (!success)
|
||||||
MainConsole.Instance.OutputFormat("Unable to set user level for account {0} {1}.", firstName, lastName);
|
MainConsole.Instance.Output("Unable to set user level for account {0} {1}.", null, firstName, lastName);
|
||||||
else
|
else
|
||||||
MainConsole.Instance.OutputFormat("User level set for user {0} {1} to {2}", firstName, lastName, level);
|
MainConsole.Instance.Output("User level set for user {0} {1} to {2}", null, firstName, lastName, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -352,7 +352,7 @@ namespace pCampBot
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No behaviour with abbreviated name {0} found", abName);
|
MainConsole.Instance.Output("No behaviour with abbreviated name {0} found", null, abName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,8 +365,8 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
if (BotConnectingState != BotManagerBotConnectingState.Ready)
|
if (BotConnectingState != BotManagerBotConnectingState.Ready)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Bot connecting status is {0}. Please wait for previous process to complete.", BotConnectingState);
|
"Bot connecting status is {0}. Please wait for previous process to complete.", null, BotConnectingState);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,8 +486,9 @@ namespace pCampBot
|
||||||
BotManager bm, List<IBehaviour> behaviours,
|
BotManager bm, List<IBehaviour> behaviours,
|
||||||
string firstName, string lastName, string password, string loginUri, string startLocation, string wearSetting)
|
string firstName, string lastName, string password, string loginUri, string startLocation, string wearSetting)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"[BOT MANAGER]: Creating bot {0} {1}, behaviours are {2}",
|
"[BOT MANAGER]: Creating bot {0} {1}, behaviours are {2}",
|
||||||
|
null,
|
||||||
firstName, lastName, string.Join(",", behaviours.ConvertAll<string>(b => b.Name).ToArray()));
|
firstName, lastName, string.Join(",", behaviours.ConvertAll<string>(b => b.Name).ToArray()));
|
||||||
|
|
||||||
Bot pb = new Bot(bm, behaviours, firstName, lastName, password, startLocation, loginUri);
|
Bot pb = new Bot(bm, behaviours, firstName, lastName, password, startLocation, loginUri);
|
||||||
|
@ -552,7 +553,7 @@ namespace pCampBot
|
||||||
botsToConnect = Math.Min(botsToConnect, disconnectedBots);
|
botsToConnect = Math.Min(botsToConnect, disconnectedBots);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Connecting {0} bots", botsToConnect);
|
MainConsole.Instance.Output("Connecting {0} bots", null, botsToConnect);
|
||||||
|
|
||||||
ConnectBots(botsToConnect);
|
ConnectBots(botsToConnect);
|
||||||
}
|
}
|
||||||
|
@ -562,7 +563,7 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
if (cmd.Length < 3 || cmd.Length > 4)
|
if (cmd.Length < 3 || cmd.Length > 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: add behaviour <abbreviated-behaviour> [<bot-number>]");
|
MainConsole.Instance.Output("Usage: add behaviour <abbreviated-behaviour> [<bot-number>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -585,7 +586,7 @@ namespace pCampBot
|
||||||
|
|
||||||
if (bot == null)
|
if (bot == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Error: No bot found with number {0}", botNumber);
|
MainConsole.Instance.Output("Error: No bot found with number {0}", null, botNumber);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,8 +607,9 @@ namespace pCampBot
|
||||||
behavioursAdded.Add(behaviour);
|
behavioursAdded.Add(behaviour);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Added behaviours {0} to bot {1}",
|
"Added behaviours {0} to bot {1}",
|
||||||
|
null,
|
||||||
string.Join(", ", behavioursAdded.ConvertAll<string>(b => b.Name).ToArray()), bot.Name);
|
string.Join(", ", behavioursAdded.ConvertAll<string>(b => b.Name).ToArray()), bot.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -616,7 +618,7 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
if (cmd.Length < 3 || cmd.Length > 4)
|
if (cmd.Length < 3 || cmd.Length > 4)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: remove behaviour <abbreviated-behaviour> [<bot-number>]");
|
MainConsole.Instance.Output("Usage: remove behaviour <abbreviated-behaviour> [<bot-number>]");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -639,7 +641,7 @@ namespace pCampBot
|
||||||
|
|
||||||
if (bot == null)
|
if (bot == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Error: No bot found with number {0}", botNumber);
|
MainConsole.Instance.Output("Error: No bot found with number {0}", null, botNumber);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,8 +666,9 @@ namespace pCampBot
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
"Removed behaviours {0} from bot {1}",
|
"Removed behaviours {0} from bot {1}",
|
||||||
|
null,
|
||||||
string.Join(", ", behavioursRemoved.ConvertAll<string>(b => b.Name).ToArray()), bot.Name);
|
string.Join(", ", behavioursRemoved.ConvertAll<string>(b => b.Name).ToArray()), bot.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -701,7 +704,7 @@ namespace pCampBot
|
||||||
|
|
||||||
private void DisconnectBotsInternal(List<Bot> connectedBots, int disconnectCount)
|
private void DisconnectBotsInternal(List<Bot> connectedBots, int disconnectCount)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Disconnecting {0} bots", disconnectCount);
|
MainConsole.Instance.Output("Disconnecting {0} bots", null, disconnectCount);
|
||||||
|
|
||||||
int disconnectedBots = 0;
|
int disconnectedBots = 0;
|
||||||
|
|
||||||
|
@ -731,7 +734,7 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
if (bot.ConnectionState == ConnectionState.Connected)
|
if (bot.ConnectionState == ConnectionState.Connected)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Sitting bot {0} on ground.", bot.Name);
|
MainConsole.Instance.Output("Sitting bot {0} on ground.", null, bot.Name);
|
||||||
bot.SitOnGround();
|
bot.SitOnGround();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -746,7 +749,7 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
if (bot.ConnectionState == ConnectionState.Connected)
|
if (bot.ConnectionState == ConnectionState.Connected)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Standing bot {0} from ground.", bot.Name);
|
MainConsole.Instance.Output("Standing bot {0} from ground.", null, bot.Name);
|
||||||
bot.Stand();
|
bot.Stand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -761,7 +764,7 @@ namespace pCampBot
|
||||||
|
|
||||||
if (connectedBots > 0)
|
if (connectedBots > 0)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Please disconnect {0} connected bots first", connectedBots);
|
MainConsole.Instance.Output("Please disconnect {0} connected bots first", null, connectedBots);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -785,8 +788,8 @@ namespace pCampBot
|
||||||
if (!ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, rawValue, out newSendAgentUpdatesSetting))
|
if (!ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, rawValue, out newSendAgentUpdatesSetting))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output("Setting SEND_AGENT_UPDATES to {0} for all bots",
|
||||||
"Setting SEND_AGENT_UPDATES to {0} for all bots", newSendAgentUpdatesSetting);
|
null, newSendAgentUpdatesSetting);
|
||||||
|
|
||||||
lock (m_bots)
|
lock (m_bots)
|
||||||
m_bots.ForEach(b => b.Client.Settings.SEND_AGENT_UPDATES = newSendAgentUpdatesSetting);
|
m_bots.ForEach(b => b.Client.Settings.SEND_AGENT_UPDATES = newSendAgentUpdatesSetting);
|
||||||
|
@ -801,7 +804,7 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
if (args.Length != 6)
|
if (args.Length != 6)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Usage: debug lludp packet <level> <bot-first-name> <bot-last-name>");
|
MainConsole.Instance.Output("Usage: debug lludp packet <level> <bot-first-name> <bot-last-name>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -820,26 +823,26 @@ namespace pCampBot
|
||||||
|
|
||||||
if (bot == null)
|
if (bot == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("No bot named {0} {1}", botFirstName, botLastName);
|
MainConsole.Instance.Output("No bot named {0} {1}", null, botFirstName, botLastName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bot.PacketDebugLevel = level;
|
bot.PacketDebugLevel = level;
|
||||||
|
|
||||||
MainConsole.Instance.OutputFormat("Set debug level of {0} to {1}", bot.Name, bot.PacketDebugLevel);
|
MainConsole.Instance.Output("Set debug level of {0} to {1}", null, bot.Name, bot.PacketDebugLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleShowRegions(string module, string[] cmd)
|
private void HandleShowRegions(string module, string[] cmd)
|
||||||
{
|
{
|
||||||
string outputFormat = "{0,-30} {1, -20} {2, -5} {3, -5}";
|
string outputFormat = "{0,-30} {1, -20} {2, -5} {3, -5}";
|
||||||
MainConsole.Instance.OutputFormat(outputFormat, "Name", "Handle", "X", "Y");
|
MainConsole.Instance.Output(outputFormat, null, "Name", "Handle", "X", "Y");
|
||||||
|
|
||||||
lock (RegionsKnown)
|
lock (RegionsKnown)
|
||||||
{
|
{
|
||||||
foreach (GridRegion region in RegionsKnown.Values)
|
foreach (GridRegion region in RegionsKnown.Values)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat(
|
MainConsole.Instance.Output(
|
||||||
outputFormat, region.Name, region.RegionHandle, region.X, region.Y);
|
outputFormat, null, region.Name, region.RegionHandle, region.X, region.Y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -908,7 +911,7 @@ namespace pCampBot
|
||||||
|
|
||||||
if (bot == null)
|
if (bot == null)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.OutputFormat("Error: No bot found with number {0}", botNumber);
|
MainConsole.Instance.Output("Error: No bot found with number {0}", null, botNumber);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue