mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Merge branch 'master' into presence-refactor
This was a large, heavily conflicted merge and things MAY have got broken. Please check!
This commit is contained in:
122
OpenSim/Region/Application/OpenSim.cs
Normal file → Executable file
122
OpenSim/Region/Application/OpenSim.cs
Normal file → Executable file
@@ -409,7 +409,7 @@ namespace OpenSim
|
||||
if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) &&
|
||||
presence.Lastname.ToLower().Contains(cmdparams[3].ToLower()))
|
||||
{
|
||||
m_log.Info(
|
||||
MainConsole.Instance.Output(
|
||||
String.Format(
|
||||
"Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}",
|
||||
presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName));
|
||||
@@ -424,7 +424,7 @@ namespace OpenSim
|
||||
presence.Scene.IncomingCloseAgent(presence.UUID);
|
||||
}
|
||||
}
|
||||
m_log.Info("");
|
||||
MainConsole.Instance.Output("");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -471,7 +471,7 @@ namespace OpenSim
|
||||
|
||||
private void HandleClearAssets(string module, string[] args)
|
||||
{
|
||||
m_log.Info("Not implemented.");
|
||||
MainConsole.Instance.Output("Not implemented.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -481,7 +481,7 @@ namespace OpenSim
|
||||
/// <param name="args"></param>
|
||||
private void HandleForceUpdate(string module, string[] args)
|
||||
{
|
||||
m_log.Info("Updating all clients");
|
||||
MainConsole.Instance.Output("Updating all clients");
|
||||
m_sceneManager.ForceCurrentSceneClientUpdate();
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ namespace OpenSim
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Info("Argument error: edit scale <prim name> <x> <y> <z>");
|
||||
MainConsole.Instance.Output("Argument error: edit scale <prim name> <x> <y> <z>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ namespace OpenSim
|
||||
{
|
||||
if (cmd.Length < 4)
|
||||
{
|
||||
m_log.Error("Usage: create region <region name> <region_file.ini>");
|
||||
MainConsole.Instance.Output("Usage: create region <region name> <region_file.ini>");
|
||||
return;
|
||||
}
|
||||
if (cmd[3].EndsWith(".xml"))
|
||||
@@ -538,7 +538,7 @@ namespace OpenSim
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("Usage: create region <region name> <region_file.ini>");
|
||||
MainConsole.Instance.Output("Usage: create region <region name> <region_file.ini>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -562,8 +562,8 @@ namespace OpenSim
|
||||
case "set":
|
||||
if (cmdparams.Length < 4)
|
||||
{
|
||||
m_log.Error("SYNTAX: " + n + " SET SECTION KEY VALUE");
|
||||
m_log.Error("EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5");
|
||||
MainConsole.Instance.Output(String.Format("SYNTAX: {0} SET SECTION KEY VALUE",n));
|
||||
MainConsole.Instance.Output(String.Format("EXAMPLE: {0} SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5",n));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -576,8 +576,7 @@ namespace OpenSim
|
||||
c.Set(cmdparams[2], _value);
|
||||
m_config.Source.Merge(source);
|
||||
|
||||
m_log.Error(n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " +
|
||||
_value);
|
||||
MainConsole.Instance.Output(String.Format("{0} {0} {1} {2} {3}",n,cmdparams[1],cmdparams[2],_value));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -585,21 +584,21 @@ namespace OpenSim
|
||||
case "get":
|
||||
if (cmdparams.Length < 3)
|
||||
{
|
||||
m_log.Error("SYNTAX: " + n + " GET SECTION KEY");
|
||||
m_log.Error("EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads");
|
||||
MainConsole.Instance.Output(String.Format("SYNTAX: {0} GET SECTION KEY",n));
|
||||
MainConsole.Instance.Output(String.Format("EXAMPLE: {0} GET ScriptEngine.DotNetEngine NumberOfScriptThreads",n));
|
||||
}
|
||||
else
|
||||
{
|
||||
IConfig c = m_config.Source.Configs[cmdparams[1]];
|
||||
if (c == null)
|
||||
{
|
||||
m_log.Info("Section \"" + cmdparams[1] + "\" does not exist.");
|
||||
MainConsole.Instance.Output(String.Format("Section \"{0}\" does not exist.",cmdparams[1]));
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Info(n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " +
|
||||
c.GetString(cmdparams[2]));
|
||||
MainConsole.Instance.Output(String.Format("{0} GET {1} {2} : {3}",n,cmdparams[1],cmdparams[2],
|
||||
c.GetString(cmdparams[2])));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,17 +607,17 @@ namespace OpenSim
|
||||
case "save":
|
||||
if (cmdparams.Length < 2)
|
||||
{
|
||||
m_log.Error("SYNTAX: " + n + " SAVE FILE");
|
||||
MainConsole.Instance.Output("SYNTAX: " + n + " SAVE FILE");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.iniFilePath == cmdparams[1])
|
||||
{
|
||||
m_log.Error("FILE can not be "+Application.iniFilePath);
|
||||
MainConsole.Instance.Output("FILE can not be " + Application.iniFilePath);
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.Info("Saving configuration file: " + cmdparams[1]);
|
||||
MainConsole.Instance.Output("Saving configuration file: " + cmdparams[1]);
|
||||
m_config.Save(cmdparams[1]);
|
||||
break;
|
||||
}
|
||||
@@ -644,7 +643,7 @@ namespace OpenSim
|
||||
case "list":
|
||||
foreach (IRegionModule irm in m_moduleLoader.GetLoadedSharedModules)
|
||||
{
|
||||
m_log.Info("Shared region module: " + irm.Name);
|
||||
MainConsole.Instance.Output(String.Format("Shared region module: {0}", irm.Name));
|
||||
}
|
||||
break;
|
||||
case "unload":
|
||||
@@ -654,7 +653,7 @@ namespace OpenSim
|
||||
{
|
||||
if (rm.Name.ToLower() == cmdparams[1].ToLower())
|
||||
{
|
||||
m_log.Info("Unloading module: " + rm.Name);
|
||||
MainConsole.Instance.Output(String.Format("Unloading module: {0}", rm.Name));
|
||||
m_moduleLoader.UnloadModule(rm);
|
||||
}
|
||||
}
|
||||
@@ -665,7 +664,7 @@ namespace OpenSim
|
||||
{
|
||||
foreach (Scene s in new ArrayList(m_sceneManager.Scenes))
|
||||
{
|
||||
m_log.Info("Loading module: " + cmdparams[1]);
|
||||
MainConsole.Instance.Output(String.Format("Loading module: {0}", cmdparams[1]));
|
||||
m_moduleLoader.LoadRegionModules(cmdparams[1], s);
|
||||
}
|
||||
}
|
||||
@@ -710,7 +709,7 @@ namespace OpenSim
|
||||
if (m_sceneManager.TryGetScene(regRemoveName, out removeScene))
|
||||
RemoveRegion(removeScene, false);
|
||||
else
|
||||
m_log.Error("no region with that name");
|
||||
MainConsole.Instance.Output("no region with that name");
|
||||
break;
|
||||
|
||||
case "delete-region":
|
||||
@@ -720,7 +719,7 @@ namespace OpenSim
|
||||
if (m_sceneManager.TryGetScene(regDeleteName, out killScene))
|
||||
RemoveRegion(killScene, true);
|
||||
else
|
||||
m_log.Error("no region with that name");
|
||||
MainConsole.Instance.Output("no region with that name");
|
||||
break;
|
||||
|
||||
case "restart":
|
||||
@@ -730,7 +729,7 @@ namespace OpenSim
|
||||
case "Add-InventoryHost":
|
||||
if (cmdparams.Length > 0)
|
||||
{
|
||||
m_log.Info("Not implemented.");
|
||||
MainConsole.Instance.Output("Not implemented.");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -748,20 +747,19 @@ namespace OpenSim
|
||||
string newRegionName = CombineParams(cmdparams, 2);
|
||||
|
||||
if (!m_sceneManager.TrySetCurrentScene(newRegionName))
|
||||
m_log.Error("Couldn't select region " + newRegionName);
|
||||
MainConsole.Instance.Output(String.Format("Couldn't select region {0}", newRegionName));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("Usage: change region <region name>");
|
||||
MainConsole.Instance.Output("Usage: change region <region name>");
|
||||
}
|
||||
|
||||
string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName);
|
||||
m_log.Info(String.Format("Currently selected region is {0}", regionName));
|
||||
MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName));
|
||||
m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName);
|
||||
m_console.ConsoleScene = m_sceneManager.CurrentScene;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Turn on some debugging values for OpenSim.
|
||||
/// </summary>
|
||||
@@ -783,9 +781,9 @@ namespace OpenSim
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("packet debug should be 0..255");
|
||||
MainConsole.Instance.Output("packet debug should be 0..255");
|
||||
}
|
||||
m_log.Info("New packet debug: " + newDebug.ToString());
|
||||
MainConsole.Instance.Output(String.Format("New packet debug: {0}", newDebug));
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -795,7 +793,7 @@ namespace OpenSim
|
||||
{
|
||||
if (m_sceneManager.CurrentScene == null)
|
||||
{
|
||||
m_log.Info("Please use 'change region <regioname>' first");
|
||||
MainConsole.Instance.Output("Please use 'change region <regioname>' first");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -804,7 +802,7 @@ namespace OpenSim
|
||||
bool physicsOn = !Convert.ToBoolean(args[4]);
|
||||
m_sceneManager.CurrentScene.SetSceneCoreDebug(scriptingOn, collisionsOn, physicsOn);
|
||||
|
||||
m_log.Info(
|
||||
MainConsole.Instance.Output(
|
||||
String.Format(
|
||||
"Set debug scene scripting = {0}, collisions = {1}, physics = {2}",
|
||||
!scriptingOn, !collisionsOn, !physicsOn));
|
||||
@@ -812,13 +810,13 @@ namespace OpenSim
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Error("debug scene <scripting> <collisions> <physics> (where inside <> is true/false)");
|
||||
MainConsole.Instance.Output("debug scene <scripting> <collisions> <physics> (where inside <> is true/false)");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
m_log.Error("Unknown debug");
|
||||
MainConsole.Instance.Output("Unknown debug");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -840,7 +838,7 @@ namespace OpenSim
|
||||
switch (showParams[0])
|
||||
{
|
||||
case "assets":
|
||||
m_log.Info("Not implemented.");
|
||||
MainConsole.Instance.Output("Not implemented.");
|
||||
break;
|
||||
|
||||
case "users":
|
||||
@@ -854,9 +852,9 @@ namespace OpenSim
|
||||
agents = m_sceneManager.GetCurrentSceneAvatars();
|
||||
}
|
||||
|
||||
m_log.Info(String.Format("\nAgents connected: {0}\n", agents.Count));
|
||||
MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count));
|
||||
|
||||
m_log.Info(
|
||||
MainConsole.Instance.Output(
|
||||
String.Format("{0,-16}{1,-16}{2,-37}{3,-11}{4,-16}{5,-30}", "Firstname", "Lastname",
|
||||
"Agent ID", "Root/Child", "Region", "Position"));
|
||||
|
||||
@@ -874,7 +872,7 @@ namespace OpenSim
|
||||
regionName = regionInfo.RegionName;
|
||||
}
|
||||
|
||||
m_log.Info(
|
||||
MainConsole.Instance.Output(
|
||||
String.Format(
|
||||
"{0,-16}{1,-16}{2,-37}{3,-11}{4,-16}{5,-30}",
|
||||
presence.Firstname,
|
||||
@@ -885,7 +883,7 @@ namespace OpenSim
|
||||
presence.AbsolutePosition.ToString()));
|
||||
}
|
||||
|
||||
m_log.Info(String.Empty);
|
||||
MainConsole.Instance.Output(String.Empty);
|
||||
break;
|
||||
|
||||
case "connections":
|
||||
@@ -903,25 +901,30 @@ namespace OpenSim
|
||||
}
|
||||
);
|
||||
|
||||
m_log.Info(connections.ToString());
|
||||
MainConsole.Instance.Output(connections.ToString());
|
||||
break;
|
||||
|
||||
case "modules":
|
||||
m_log.Info("The currently loaded shared modules are:");
|
||||
MainConsole.Instance.Output("The currently loaded shared modules are:");
|
||||
foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules)
|
||||
{
|
||||
m_log.Info("Shared Module: " + module.Name);
|
||||
MainConsole.Instance.Output("Shared Module: " + module.Name);
|
||||
}
|
||||
|
||||
MainConsole.Instance.Output("");
|
||||
break;
|
||||
|
||||
case "regions":
|
||||
m_sceneManager.ForEachScene(
|
||||
delegate(Scene scene)
|
||||
{
|
||||
m_log.Info("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " +
|
||||
scene.RegionInfo.RegionLocX + " , Region YLoc: " +
|
||||
scene.RegionInfo.RegionLocY + " , Region Port: " +
|
||||
scene.RegionInfo.InternalEndPoint.Port.ToString());
|
||||
MainConsole.Instance.Output(String.Format(
|
||||
"Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}",
|
||||
scene.RegionInfo.RegionName,
|
||||
scene.RegionInfo.RegionLocX,
|
||||
scene.RegionInfo.RegionLocY,
|
||||
scene.RegionInfo.InternalEndPoint.Port));
|
||||
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -946,8 +949,10 @@ namespace OpenSim
|
||||
{
|
||||
rating = "PG";
|
||||
}
|
||||
m_log.Info("Region Name: " + scene.RegionInfo.RegionName + " , Region Rating: " +
|
||||
rating);
|
||||
MainConsole.Instance.Output(String.Format(
|
||||
"Region Name: {0}, Region Rating {1}",
|
||||
scene.RegionInfo.RegionName,
|
||||
rating));
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -968,7 +973,7 @@ namespace OpenSim
|
||||
if (client is IStatsCollector)
|
||||
{
|
||||
report = report + client.FirstName +
|
||||
" " + client.LastName + "\n";
|
||||
" " + client.LastName;
|
||||
|
||||
IStatsCollector stats =
|
||||
(IStatsCollector) client;
|
||||
@@ -985,7 +990,7 @@ namespace OpenSim
|
||||
"Texture",
|
||||
"Asset");
|
||||
report = report + stats.Report() +
|
||||
"\n\n";
|
||||
"\n";
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1017,7 +1022,7 @@ namespace OpenSim
|
||||
/// <param name="cmdparams"></param>
|
||||
protected void SaveXml(string module, string[] cmdparams)
|
||||
{
|
||||
m_log.Error("[CONSOLE]: PLEASE NOTE, save-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use save-xml2, please file a mantis detailing the reason.");
|
||||
MainConsole.Instance.Output("PLEASE NOTE, save-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use save-xml2, please file a mantis detailing the reason.");
|
||||
|
||||
if (cmdparams.Length > 0)
|
||||
{
|
||||
@@ -1036,7 +1041,7 @@ namespace OpenSim
|
||||
/// <param name="cmdparams"></param>
|
||||
protected void LoadXml(string module, string[] cmdparams)
|
||||
{
|
||||
m_log.Error("[CONSOLE]: PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason.");
|
||||
MainConsole.Instance.Output("PLEASE NOTE, load-xml is DEPRECATED and may be REMOVED soon. If you are using this and there is some reason you can't use load-xml2, please file a mantis detailing the reason.");
|
||||
|
||||
Vector3 loadOffset = new Vector3(0, 0, 0);
|
||||
if (cmdparams.Length > 2)
|
||||
@@ -1059,8 +1064,7 @@ namespace OpenSim
|
||||
{
|
||||
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[6]);
|
||||
}
|
||||
m_log.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," +
|
||||
loadOffset.Z + ">");
|
||||
MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z));
|
||||
}
|
||||
}
|
||||
m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
|
||||
@@ -1073,7 +1077,7 @@ namespace OpenSim
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
m_log.Error("Default xml not found. Usage: load-xml <filename>");
|
||||
MainConsole.Instance.Output("Default xml not found. Usage: load-xml <filename>");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1109,7 +1113,7 @@ namespace OpenSim
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
m_log.Error("Specified xml not found. Usage: load xml2 <filename>");
|
||||
MainConsole.Instance.Output("Specified xml not found. Usage: load xml2 <filename>");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1120,7 +1124,7 @@ namespace OpenSim
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
m_log.Error("Default xml not found. Usage: load xml2 <filename>");
|
||||
MainConsole.Instance.Output("Default xml not found. Usage: load xml2 <filename>");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1137,7 +1141,7 @@ namespace OpenSim
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(e.Message);
|
||||
MainConsole.Instance.Output(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user