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
|
@ -497,17 +497,31 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "change-region":
|
case "change-region":
|
||||||
|
if (cmdparams.Length > 0)
|
||||||
|
{
|
||||||
|
string name = this.CombineParams(cmdparams, 0);
|
||||||
|
Console.WriteLine("Searching for Region: '" + name +"'");
|
||||||
foreach (Scene scene in m_localScenes)
|
foreach (Scene scene in m_localScenes)
|
||||||
{
|
{
|
||||||
if (scene.RegionInfo.RegionName.ToLower() == cmdparams[0].ToLower())
|
if (scene.RegionInfo.RegionName.ToLower() == name.ToLower())
|
||||||
{
|
{
|
||||||
m_consoleRegion = scene;
|
m_consoleRegion = scene;
|
||||||
|
MainLog.Instance.Verbose("Current Region set as: " + m_consoleRegion.RegionInfo.RegionName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "exit-region":
|
case "exit-region":
|
||||||
|
if (m_consoleRegion != null)
|
||||||
|
{
|
||||||
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -562,6 +576,17 @@ namespace OpenSim
|
||||||
break;
|
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
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1135,7 +1135,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public void RegisterModuleInterface<M>( M mod)
|
public void RegisterModuleInterface<M>( M mod)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("registering module interface " + typeof(M));
|
|
||||||
if (!this.ModuleInterfaces.ContainsKey(typeof(M)))
|
if (!this.ModuleInterfaces.ContainsKey(typeof(M)))
|
||||||
{
|
{
|
||||||
ModuleInterfaces.Add(typeof(M), mod);
|
ModuleInterfaces.Add(typeof(M), mod);
|
||||||
|
@ -1255,6 +1254,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "set-time":
|
case "set-time":
|
||||||
|
this.SetTimePhase(Convert.ToInt32(cmdparams[0]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "backup":
|
case "backup":
|
||||||
|
|
Loading…
Reference in New Issue