Removed the exit-region command, now use "change-region root" or "change-region .." to change back to root level. [Would be nice if the command prompt changed to show what the current region was, but think that will need changes to the console code so for now it will have to stay as it is].
parent
0eef82291e
commit
710856e3d3
|
@ -371,7 +371,7 @@ namespace OpenSim
|
||||||
/// <param name="cmdparams">Additional arguments passed to the command</param>
|
/// <param name="cmdparams">Additional arguments passed to the command</param>
|
||||||
public void RunCmd(string command, string[] cmdparams)
|
public void RunCmd(string command, string[] cmdparams)
|
||||||
{
|
{
|
||||||
if ((m_consoleRegion == null) || (command == "exit-region") || (command == "change-region"))
|
if ((m_consoleRegion == null) ||(command == "change-region"))
|
||||||
{
|
{
|
||||||
switch (command)
|
switch (command)
|
||||||
{
|
{
|
||||||
|
@ -498,6 +498,20 @@ namespace OpenSim
|
||||||
|
|
||||||
case "change-region":
|
case "change-region":
|
||||||
if (cmdparams.Length > 0)
|
if (cmdparams.Length > 0)
|
||||||
|
{
|
||||||
|
if ((cmdparams[0].ToLower() == "root") || (cmdparams[0].ToLower() == ".."))
|
||||||
|
{
|
||||||
|
if (m_consoleRegion != null)
|
||||||
|
{
|
||||||
|
m_consoleRegion = null;
|
||||||
|
MainLog.Instance.Verbose("Now at Root level");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainLog.Instance.Verbose("Already at Root level");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
string name = this.CombineParams(cmdparams, 0);
|
string name = this.CombineParams(cmdparams, 0);
|
||||||
Console.WriteLine("Searching for Region: '" + name + "'");
|
Console.WriteLine("Searching for Region: '" + name + "'");
|
||||||
|
@ -510,6 +524,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_consoleRegion != null)
|
if (m_consoleRegion != null)
|
||||||
|
@ -523,18 +538,6 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "exit-region":
|
|
||||||
if (m_consoleRegion != null)
|
|
||||||
{
|
|
||||||
m_consoleRegion = null;
|
|
||||||
MainLog.Instance.Verbose("Exiting region, Now at Root level");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainLog.Instance.Verbose("No region is set. Already at Root level");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m_log.Error("Unknown command");
|
m_log.Error("Unknown command");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.Environment.Interfaces
|
||||||
|
{
|
||||||
|
public interface IHttpRequests
|
||||||
|
{
|
||||||
|
LLUUID MakeHttpRequest(string url, string type, string body);
|
||||||
|
}
|
||||||
|
}
|
|
@ -93,6 +93,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// this most likely shouldn't be handled as a API method like this, but doing it for testing purposes
|
// this most likely shouldn't be handled as a API method like this, but doing it for testing purposes
|
||||||
public ModuleAPIMethod2<bool, string, byte[]> AddXferFile = null;
|
public ModuleAPIMethod2<bool, string, byte[]> AddXferFile = null;
|
||||||
|
|
||||||
|
private IHttpRequests m_httpRequestModule = null;
|
||||||
private ISimChat m_simChatModule = null;
|
private ISimChat m_simChatModule = null;
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
@ -196,6 +197,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void SetModuleInterfaces()
|
public void SetModuleInterfaces()
|
||||||
{
|
{
|
||||||
m_simChatModule = this.RequestModuleInterface<ISimChat>();
|
m_simChatModule = this.RequestModuleInterface<ISimChat>();
|
||||||
|
m_httpRequestModule = this.RequestModuleInterface<IHttpRequests>();
|
||||||
|
|
||||||
//should change so it uses the module interface functions
|
//should change so it uses the module interface functions
|
||||||
AddXferFile = (ModuleAPIMethod2<bool, string, byte[]>)this.RequestAPIMethod("API_AddXferFile");
|
AddXferFile = (ModuleAPIMethod2<bool, string, byte[]>)this.RequestAPIMethod("API_AddXferFile");
|
||||||
|
@ -1318,6 +1320,15 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LLUUID MakeHttpRequest(string url, string type, string body)
|
||||||
|
{
|
||||||
|
if (m_httpRequestModule != null)
|
||||||
|
{
|
||||||
|
return m_httpRequestModule.MakeHttpRequest(url, type, body);
|
||||||
|
}
|
||||||
|
return LLUUID.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
#region Script Engine
|
#region Script Engine
|
||||||
private List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface> ScriptEngines = new List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface>();
|
private List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface> ScriptEngines = new List<OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface>();
|
||||||
public void AddScriptEngine(OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine, LogBase m_logger)
|
public void AddScriptEngine(OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine, LogBase m_logger)
|
||||||
|
|
Loading…
Reference in New Issue