aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs41
1 files changed, 22 insertions, 19 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index c94d328..5dfb30b 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -371,7 +371,7 @@ namespace OpenSim
371 /// <param name="cmdparams">Additional arguments passed to the command</param> 371 /// <param name="cmdparams">Additional arguments passed to the command</param>
372 public void RunCmd(string command, string[] cmdparams) 372 public void RunCmd(string command, string[] cmdparams)
373 { 373 {
374 if ((m_consoleRegion == null) || (command == "exit-region") || (command == "change-region")) 374 if ((m_consoleRegion == null) ||(command == "change-region"))
375 { 375 {
376 switch (command) 376 switch (command)
377 { 377 {
@@ -499,14 +499,29 @@ namespace OpenSim
499 case "change-region": 499 case "change-region":
500 if (cmdparams.Length > 0) 500 if (cmdparams.Length > 0)
501 { 501 {
502 string name = this.CombineParams(cmdparams, 0); 502 if ((cmdparams[0].ToLower() == "root") || (cmdparams[0].ToLower() == ".."))
503 Console.WriteLine("Searching for Region: '" + name + "'");
504 foreach (Scene scene in m_localScenes)
505 { 503 {
506 if (scene.RegionInfo.RegionName.ToLower() == name.ToLower()) 504 if (m_consoleRegion != null)
507 { 505 {
508 m_consoleRegion = scene; 506 m_consoleRegion = null;
509 MainLog.Instance.Verbose("Setting current region: " + m_consoleRegion.RegionInfo.RegionName); 507 MainLog.Instance.Verbose("Now at Root level");
508 }
509 else
510 {
511 MainLog.Instance.Verbose("Already at Root level");
512 }
513 }
514 else
515 {
516 string name = this.CombineParams(cmdparams, 0);
517 Console.WriteLine("Searching for Region: '" + name + "'");
518 foreach (Scene scene in m_localScenes)
519 {
520 if (scene.RegionInfo.RegionName.ToLower() == name.ToLower())
521 {
522 m_consoleRegion = scene;
523 MainLog.Instance.Verbose("Setting current region: " + m_consoleRegion.RegionInfo.RegionName);
524 }
510 } 525 }
511 } 526 }
512 } 527 }
@@ -523,18 +538,6 @@ namespace OpenSim
523 } 538 }
524 break; 539 break;
525 540
526 case "exit-region":
527 if (m_consoleRegion != null)
528 {
529 m_consoleRegion = null;
530 MainLog.Instance.Verbose("Exiting region, Now at Root level");
531 }
532 else
533 {
534 MainLog.Instance.Verbose("No region is set. Already at Root level");
535 }
536 break;
537
538 default: 541 default:
539 m_log.Error("Unknown command"); 542 m_log.Error("Unknown command");
540 break; 543 break;