aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorMW2007-09-04 16:39:44 +0000
committerMW2007-09-04 16:39:44 +0000
commit16cbc35f0cc26c9e8e75160f9ada1f56695cec5e (patch)
tree286a1331f9a0d23ddaa8fa2e4481ce3f09f20d6a /OpenSim/Region/Application
parentSome work on Module loading/management. (diff)
downloadopensim-SC_OLD-16cbc35f0cc26c9e8e75160f9ada1f56695cec5e.zip
opensim-SC_OLD-16cbc35f0cc26c9e8e75160f9ada1f56695cec5e.tar.gz
opensim-SC_OLD-16cbc35f0cc26c9e8e75160f9ada1f56695cec5e.tar.bz2
opensim-SC_OLD-16cbc35f0cc26c9e8e75160f9ada1f56695cec5e.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs41
1 files changed, 33 insertions, 8 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 05d79dd..bf37bb6 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -62,8 +62,8 @@ namespace OpenSim
62 public bool m_sandbox; 62 public bool m_sandbox;
63 public bool user_accounts; 63 public bool user_accounts;
64 public bool m_gridLocalAsset; 64 public bool m_gridLocalAsset;
65 65
66 66
67 protected ModuleLoader m_moduleLoader; 67 protected ModuleLoader m_moduleLoader;
68 68
69 protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll"; 69 protected string m_storageDLL = "OpenSim.DataStore.NullStorage.dll";
@@ -214,7 +214,7 @@ namespace OpenSim
214 OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine = ScriptEngineLoader.LoadScriptEngine(m_scriptEngine); 214 OpenSim.Region.Environment.Scenes.Scripting.ScriptEngineInterface ScriptEngine = ScriptEngineLoader.LoadScriptEngine(m_scriptEngine);
215 scene.AddScriptEngine(ScriptEngine, m_log); 215 scene.AddScriptEngine(ScriptEngine, m_log);
216 } 216 }
217 217
218 //Server side object editing permissions checking 218 //Server side object editing permissions checking
219 if (m_permissions) 219 if (m_permissions)
220 scene.PermissionsMngr.EnablePermissions(); 220 scene.PermissionsMngr.EnablePermissions();
@@ -497,17 +497,31 @@ namespace OpenSim
497 break; 497 break;
498 498
499 case "change-region": 499 case "change-region":
500 foreach (Scene scene in m_localScenes) 500 if (cmdparams.Length > 0)
501 { 501 {
502 if (scene.RegionInfo.RegionName.ToLower() == cmdparams[0].ToLower()) 502 string name = this.CombineParams(cmdparams, 0);
503 Console.WriteLine("Searching for Region: '" + name +"'");
504 foreach (Scene scene in m_localScenes)
503 { 505 {
504 m_consoleRegion = scene; 506 if (scene.RegionInfo.RegionName.ToLower() == name.ToLower())
507 {
508 m_consoleRegion = scene;
509 MainLog.Instance.Verbose("Current Region set as: " + m_consoleRegion.RegionInfo.RegionName);
510 }
505 } 511 }
506 } 512 }
507 break; 513 break;
508 514
509 case "exit-region": 515 case "exit-region":
510 m_consoleRegion = null; 516 if (m_consoleRegion != null)
517 {
518 m_consoleRegion = null;
519 MainLog.Instance.Verbose("Exiting region, Now at Root level");
520 }
521 else
522 {
523 MainLog.Instance.Verbose("No region is set. Already at Root level");
524 }
511 break; 525 break;
512 526
513 default: 527 default:
@@ -562,6 +576,17 @@ namespace OpenSim
562 break; 576 break;
563 } 577 }
564 } 578 }
579
580 private string CombineParams(string[] commandParams, int pos)
581 {
582 string result = "";
583 for (int i = pos; i < commandParams.Length; i++)
584 {
585 result += commandParams[i] +" ";
586 }
587 result = result.TrimEnd(' ');
588 return result;
589 }
565 #endregion 590 #endregion
566 } 591 }
567 592