diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 81 |
2 files changed, 82 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 501d47f..cb48ac1 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -425,7 +425,7 @@ namespace OpenSim | |||
425 | if (alert != null) | 425 | if (alert != null) |
426 | presence.ControllingClient.Kick(alert); | 426 | presence.ControllingClient.Kick(alert); |
427 | else | 427 | else |
428 | presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); | 428 | presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); |
429 | 429 | ||
430 | // ...and close on our side | 430 | // ...and close on our side |
431 | presence.Scene.IncomingCloseAgent(presence.UUID); | 431 | presence.Scene.IncomingCloseAgent(presence.UUID); |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f535fe8..fc67f94 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -88,6 +88,10 @@ namespace OpenSim | |||
88 | 88 | ||
89 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); | 89 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); |
90 | 90 | ||
91 | private List<string> m_permsModules; | ||
92 | |||
93 | private bool m_securePermissionsLoading = true; | ||
94 | |||
91 | /// <value> | 95 | /// <value> |
92 | /// The config information passed into the OpenSimulator region server. | 96 | /// The config information passed into the OpenSimulator region server. |
93 | /// </value> | 97 | /// </value> |
@@ -185,6 +189,11 @@ namespace OpenSim | |||
185 | CreatePIDFile(pidFile); | 189 | CreatePIDFile(pidFile); |
186 | 190 | ||
187 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); | 191 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); |
192 | |||
193 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); | ||
194 | |||
195 | string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule"); | ||
196 | m_permsModules = new List<string>(permissionModules.Split(',')); | ||
188 | } | 197 | } |
189 | 198 | ||
190 | base.StartupSpecific(); | 199 | base.StartupSpecific(); |
@@ -342,11 +351,50 @@ namespace OpenSim | |||
342 | } | 351 | } |
343 | else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); | 352 | else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); |
344 | 353 | ||
354 | if (m_securePermissionsLoading) | ||
355 | { | ||
356 | foreach (string s in m_permsModules) | ||
357 | { | ||
358 | if (!scene.RegionModules.ContainsKey(s)) | ||
359 | { | ||
360 | bool found = false; | ||
361 | foreach (IRegionModule m in modules) | ||
362 | { | ||
363 | if (m.Name == s) | ||
364 | { | ||
365 | found = true; | ||
366 | } | ||
367 | } | ||
368 | if (!found) | ||
369 | { | ||
370 | m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
371 | Environment.Exit(0); | ||
372 | } | ||
373 | } | ||
374 | } | ||
375 | } | ||
376 | |||
345 | scene.SetModuleInterfaces(); | 377 | scene.SetModuleInterfaces(); |
378 | // First Step of bootreport sequence | ||
379 | if (scene.SnmpService != null) | ||
380 | { | ||
381 | scene.SnmpService.ColdStart(1,scene); | ||
382 | scene.SnmpService.LinkDown(scene); | ||
383 | } | ||
384 | |||
385 | if (scene.SnmpService != null) | ||
386 | { | ||
387 | scene.SnmpService.BootInfo("Loading prins", scene); | ||
388 | } | ||
346 | 389 | ||
347 | // Prims have to be loaded after module configuration since some modules may be invoked during the load | 390 | // Prims have to be loaded after module configuration since some modules may be invoked during the load |
348 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); | 391 | scene.LoadPrimsFromStorage(regionInfo.originRegionID); |
349 | 392 | ||
393 | if (scene.SnmpService != null) | ||
394 | { | ||
395 | scene.SnmpService.BootInfo("Creating region texture", scene); | ||
396 | } | ||
397 | |||
350 | // moved these here as the terrain texture has to be created after the modules are initialized | 398 | // moved these here as the terrain texture has to be created after the modules are initialized |
351 | // and has to happen before the region is registered with the grid. | 399 | // and has to happen before the region is registered with the grid. |
352 | scene.CreateTerrainTexture(); | 400 | scene.CreateTerrainTexture(); |
@@ -354,6 +402,10 @@ namespace OpenSim | |||
354 | // TODO : Try setting resource for region xstats here on scene | 402 | // TODO : Try setting resource for region xstats here on scene |
355 | MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); | 403 | MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); |
356 | 404 | ||
405 | if (scene.SnmpService != null) | ||
406 | { | ||
407 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); | ||
408 | } | ||
357 | try | 409 | try |
358 | { | 410 | { |
359 | scene.RegisterRegionWithGrid(); | 411 | scene.RegisterRegionWithGrid(); |
@@ -362,11 +414,20 @@ namespace OpenSim | |||
362 | { | 414 | { |
363 | m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace); | 415 | m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace); |
364 | 416 | ||
417 | if (scene.SnmpService != null) | ||
418 | { | ||
419 | scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); | ||
420 | } | ||
365 | // Carrying on now causes a lot of confusion down the | 421 | // Carrying on now causes a lot of confusion down the |
366 | // line - we need to get the user's attention | 422 | // line - we need to get the user's attention |
367 | Environment.Exit(1); | 423 | Environment.Exit(1); |
368 | } | 424 | } |
369 | 425 | ||
426 | if (scene.SnmpService != null) | ||
427 | { | ||
428 | scene.SnmpService.BootInfo("Grid Registration done", scene); | ||
429 | } | ||
430 | |||
370 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 431 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
371 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 432 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
372 | 433 | ||
@@ -374,6 +435,11 @@ namespace OpenSim | |||
374 | // scripting engines. | 435 | // scripting engines. |
375 | scene.CreateScriptInstances(); | 436 | scene.CreateScriptInstances(); |
376 | 437 | ||
438 | if (scene.SnmpService != null) | ||
439 | { | ||
440 | scene.SnmpService.BootInfo("ScriptEngine started", scene); | ||
441 | } | ||
442 | |||
377 | m_sceneManager.Add(scene); | 443 | m_sceneManager.Add(scene); |
378 | 444 | ||
379 | if (m_autoCreateClientStack) | 445 | if (m_autoCreateClientStack) |
@@ -382,6 +448,10 @@ namespace OpenSim | |||
382 | clientServer.Start(); | 448 | clientServer.Start(); |
383 | } | 449 | } |
384 | 450 | ||
451 | if (scene.SnmpService != null) | ||
452 | { | ||
453 | scene.SnmpService.BootInfo("Initializing region modules", scene); | ||
454 | } | ||
385 | if (do_post_init) | 455 | if (do_post_init) |
386 | { | 456 | { |
387 | foreach (IRegionModule module in modules) | 457 | foreach (IRegionModule module in modules) |
@@ -393,6 +463,12 @@ namespace OpenSim | |||
393 | 463 | ||
394 | mscene = scene; | 464 | mscene = scene; |
395 | 465 | ||
466 | if (scene.SnmpService != null) | ||
467 | { | ||
468 | scene.SnmpService.BootInfo("The region is operational", scene); | ||
469 | scene.SnmpService.LinkUp(scene); | ||
470 | } | ||
471 | |||
396 | scene.StartTimer(); | 472 | scene.StartTimer(); |
397 | 473 | ||
398 | return clientServer; | 474 | return clientServer; |
@@ -401,6 +477,11 @@ namespace OpenSim | |||
401 | private void ShutdownRegion(Scene scene) | 477 | private void ShutdownRegion(Scene scene) |
402 | { | 478 | { |
403 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); | 479 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); |
480 | if (scene.SnmpService != null) | ||
481 | { | ||
482 | scene.SnmpService.BootInfo("The region is shutting down", scene); | ||
483 | scene.SnmpService.LinkDown(scene); | ||
484 | } | ||
404 | IRegionModulesController controller; | 485 | IRegionModulesController controller; |
405 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) | 486 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) |
406 | { | 487 | { |