From d7b7ff3d49ebb0ef8c07034d2b1e023e156f0015 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 4 Sep 2007 16:48:06 +0000 Subject: Using change-region without a region name will now display the currently active region's name. --- OpenSim/Region/Application/OpenSimMain.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index bf37bb6..f84e8fc 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -371,7 +371,7 @@ namespace OpenSim /// Additional arguments passed to the command public void RunCmd(string command, string[] cmdparams) { - if ((m_consoleRegion == null) || (command == "exit-region")) + if ((m_consoleRegion == null) || (command == "exit-region") || (command == "change-region")) { switch (command) { @@ -500,16 +500,27 @@ namespace OpenSim if (cmdparams.Length > 0) { string name = this.CombineParams(cmdparams, 0); - Console.WriteLine("Searching for Region: '" + name +"'"); + Console.WriteLine("Searching for Region: '" + name + "'"); foreach (Scene scene in m_localScenes) { if (scene.RegionInfo.RegionName.ToLower() == name.ToLower()) { m_consoleRegion = scene; - MainLog.Instance.Verbose("Current Region set as: " + m_consoleRegion.RegionInfo.RegionName); + MainLog.Instance.Verbose("Setting current region: " + m_consoleRegion.RegionInfo.RegionName); } } } + else + { + if (m_consoleRegion != null) + { + MainLog.Instance.Verbose("Current Region: " + m_consoleRegion.RegionInfo.RegionName + ". To change region please use 'change-region '"); + } + else + { + MainLog.Instance.Verbose("Currently at Root level. To change region please use 'change-region '"); + } + } break; case "exit-region": -- cgit v1.1