diff options
Added IRegistryCore and RegistryCore to OpenSim.Framework.
Added a ApplicationRegistry to OpenSimBase.
Changed LoadRegionsPlugin so it registers itself to that application registry.
Added a event to LoadRegionsPlugin, that is triggered when it creates a new scene ,although maybe this event should actually be in opensimBase incase other plugins are creating regions (like the RemoteAdminPlugin).
Diffstat (limited to 'OpenSim/Region/Application/OpenSim.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index a17d92f..a8adf58 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -95,6 +95,40 @@ namespace OpenSim | |||
95 | m_console.SetGuiMode(m_gui); | 95 | m_console.SetGuiMode(m_gui); |
96 | MainConsole.Instance = m_console; | 96 | MainConsole.Instance = m_console; |
97 | 97 | ||
98 | RegisterConsoleCommands(); | ||
99 | |||
100 | base.StartupSpecific(); | ||
101 | |||
102 | //Run Startup Commands | ||
103 | if (String.IsNullOrEmpty( m_startupCommandsFile )) | ||
104 | { | ||
105 | m_log.Info("[STARTUP]: No startup command script specified. Moving on..."); | ||
106 | } | ||
107 | else | ||
108 | { | ||
109 | RunCommandScript(m_startupCommandsFile); | ||
110 | } | ||
111 | |||
112 | // Start timer script (run a script every xx seconds) | ||
113 | if (m_timedScript != "disabled") | ||
114 | { | ||
115 | m_scriptTimer = new Timer(); | ||
116 | m_scriptTimer.Enabled = true; | ||
117 | m_scriptTimer.Interval = 1200 * 1000; | ||
118 | m_scriptTimer.Elapsed += RunAutoTimerScript; | ||
119 | } | ||
120 | |||
121 | PrintFileToConsole("startuplogo.txt"); | ||
122 | |||
123 | // For now, start at the 'root' level by default | ||
124 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it | ||
125 | ChangeSelectedRegion("region", new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName}); | ||
126 | else | ||
127 | ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); | ||
128 | } | ||
129 | |||
130 | private void RegisterConsoleCommands() | ||
131 | { | ||
98 | m_console.Commands.AddCommand("region", false, "clear assets", | 132 | m_console.Commands.AddCommand("region", false, "clear assets", |
99 | "clear assets", | 133 | "clear assets", |
100 | "Clear the asset cache", HandleClearAssets); | 134 | "Clear the asset cache", HandleClearAssets); |
@@ -255,35 +289,6 @@ namespace OpenSim | |||
255 | "reset user password [<first> [<last> [<password>]]]", | 289 | "reset user password [<first> [<last> [<password>]]]", |
256 | "Reset a user password", HandleResetUserPassword); | 290 | "Reset a user password", HandleResetUserPassword); |
257 | } | 291 | } |
258 | |||
259 | base.StartupSpecific(); | ||
260 | |||
261 | //Run Startup Commands | ||
262 | if (String.IsNullOrEmpty( m_startupCommandsFile )) | ||
263 | { | ||
264 | m_log.Info("[STARTUP]: No startup command script specified. Moving on..."); | ||
265 | } | ||
266 | else | ||
267 | { | ||
268 | RunCommandScript(m_startupCommandsFile); | ||
269 | } | ||
270 | |||
271 | // Start timer script (run a script every xx seconds) | ||
272 | if (m_timedScript != "disabled") | ||
273 | { | ||
274 | m_scriptTimer = new Timer(); | ||
275 | m_scriptTimer.Enabled = true; | ||
276 | m_scriptTimer.Interval = 1200 * 1000; | ||
277 | m_scriptTimer.Elapsed += RunAutoTimerScript; | ||
278 | } | ||
279 | |||
280 | PrintFileToConsole("startuplogo.txt"); | ||
281 | |||
282 | // For now, start at the 'root' level by default | ||
283 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it | ||
284 | ChangeSelectedRegion("region", new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName}); | ||
285 | else | ||
286 | ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); | ||
287 | } | 292 | } |
288 | 293 | ||
289 | public override void ShutdownSpecific() | 294 | public override void ShutdownSpecific() |
@@ -410,9 +415,9 @@ namespace OpenSim | |||
410 | { | 415 | { |
411 | m_console.Error("Usage: create region <region name> <region_file.xml>"); | 416 | m_console.Error("Usage: create region <region name> <region_file.xml>"); |
412 | } | 417 | } |
413 | |||
414 | 418 | ||
415 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true); | 419 | IScene scene; |
420 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene); | ||
416 | } | 421 | } |
417 | 422 | ||
418 | private void HandleLoginEnable(string module, string[] cmd) | 423 | private void HandleLoginEnable(string module, string[] cmd) |