Fixed it so change-region works with region names that have spaces in them.
Fixed it so that change-region gives some feedback to show if its worked (found the region) or not.afrisby
parent
bfd36e2e83
commit
16cbc35f0c
|
@ -62,8 +62,8 @@ namespace OpenSim
|
|||
public bool m_sandbox;
|
||||
public bool user_accounts;
|
||||
public bool m_gridLocalAsset;
|
||||
|
||||
|
||||
|
||||
|
||||
protected ModuleLoader m_moduleLoader;
|
||||
|
||||
protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll";
|
||||
|
@ -214,7 +214,7 @@ namespace OpenSim
|
|||
OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine = ScriptEngineLoader.LoadScriptEngine(m_scriptEngine);
|
||||
scene.AddScriptEngine(ScriptEngine, m_log);
|
||||
}
|
||||
|
||||
|
||||
//Server side object editing permissions checking
|
||||
if (m_permissions)
|
||||
scene.PermissionsMngr.EnablePermissions();
|
||||
|
@ -497,17 +497,31 @@ namespace OpenSim
|
|||
break;
|
||||
|
||||
case "change-region":
|
||||
foreach (Scene scene in m_localScenes)
|
||||
if (cmdparams.Length > 0)
|
||||
{
|
||||
if (scene.RegionInfo.RegionName.ToLower() == cmdparams[0].ToLower())
|
||||
string name = this.CombineParams(cmdparams, 0);
|
||||
Console.WriteLine("Searching for Region: '" + name +"'");
|
||||
foreach (Scene scene in m_localScenes)
|
||||
{
|
||||
m_consoleRegion = scene;
|
||||
if (scene.RegionInfo.RegionName.ToLower() == name.ToLower())
|
||||
{
|
||||
m_consoleRegion = scene;
|
||||
MainLog.Instance.Verbose("Current Region set as: " + m_consoleRegion.RegionInfo.RegionName);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case "exit-region":
|
||||
m_consoleRegion = null;
|
||||
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:
|
||||
|
@ -562,6 +576,17 @@ namespace OpenSim
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private string CombineParams(string[] commandParams, int pos)
|
||||
{
|
||||
string result = "";
|
||||
for (int i = pos; i < commandParams.Length; i++)
|
||||
{
|
||||
result += commandParams[i] +" ";
|
||||
}
|
||||
result = result.TrimEnd(' ');
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
@ -1135,7 +1135,6 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
public void RegisterModuleInterface<M>( M mod)
|
||||
{
|
||||
//Console.WriteLine("registering module interface " + typeof(M));
|
||||
if (!this.ModuleInterfaces.ContainsKey(typeof(M)))
|
||||
{
|
||||
ModuleInterfaces.Add(typeof(M), mod);
|
||||
|
@ -1255,6 +1254,7 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
break;
|
||||
|
||||
case "set-time":
|
||||
this.SetTimePhase(Convert.ToInt32(cmdparams[0]));
|
||||
break;
|
||||
|
||||
case "backup":
|
||||
|
|
Loading…
Reference in New Issue