diff options
author | MW | 2007-09-04 16:39:44 +0000 |
---|---|---|
committer | MW | 2007-09-04 16:39:44 +0000 |
commit | 16cbc35f0cc26c9e8e75160f9ada1f56695cec5e (patch) | |
tree | 286a1331f9a0d23ddaa8fa2e4481ce3f09f20d6a /OpenSim/Region | |
parent | Some work on Module loading/management. (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 41 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 |
2 files changed, 34 insertions, 9 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 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index b92f8c8..3122c5d 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1135,7 +1135,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1135 | 1135 | ||
1136 | public void RegisterModuleInterface<M>( M mod) | 1136 | public void RegisterModuleInterface<M>( M mod) |
1137 | { | 1137 | { |
1138 | //Console.WriteLine("registering module interface " + typeof(M)); | ||
1139 | if (!this.ModuleInterfaces.ContainsKey(typeof(M))) | 1138 | if (!this.ModuleInterfaces.ContainsKey(typeof(M))) |
1140 | { | 1139 | { |
1141 | ModuleInterfaces.Add(typeof(M), mod); | 1140 | ModuleInterfaces.Add(typeof(M), mod); |
@@ -1255,6 +1254,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1255 | break; | 1254 | break; |
1256 | 1255 | ||
1257 | case "set-time": | 1256 | case "set-time": |
1257 | this.SetTimePhase(Convert.ToInt32(cmdparams[0])); | ||
1258 | break; | 1258 | break; |
1259 | 1259 | ||
1260 | case "backup": | 1260 | case "backup": |