aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs83
2 files changed, 84 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 2236e43..5f07272 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -492,7 +492,7 @@ namespace OpenSim
492 if (alert != null) 492 if (alert != null)
493 presence.ControllingClient.Kick(alert); 493 presence.ControllingClient.Kick(alert);
494 else 494 else
495 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 495 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
496 496
497 presence.Scene.IncomingCloseAgent(presence.UUID, force); 497 presence.Scene.IncomingCloseAgent(presence.UUID, force);
498 } 498 }
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 7b591a8..7232383 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -97,6 +97,10 @@ namespace OpenSim
97 97
98 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); 98 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
99 99
100 private List<string> m_permsModules;
101
102 private bool m_securePermissionsLoading = true;
103
100 /// <value> 104 /// <value>
101 /// The config information passed into the OpenSimulator region server. 105 /// The config information passed into the OpenSimulator region server.
102 /// </value> 106 /// </value>
@@ -201,6 +205,11 @@ namespace OpenSim
201 CreatePIDFile(pidFile); 205 CreatePIDFile(pidFile);
202 206
203 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); 207 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
208
209 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
210
211 string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule");
212 m_permsModules = new List<string>(permissionModules.Split(','));
204 } 213 }
205 214
206 // Load the simulation data service 215 // Load the simulation data service
@@ -227,6 +236,12 @@ namespace OpenSim
227 m_moduleLoader = new ModuleLoader(m_config.Source); 236 m_moduleLoader = new ModuleLoader(m_config.Source);
228 237
229 LoadPlugins(); 238 LoadPlugins();
239
240 if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch!
241 {
242 Environment.Exit(1);
243 }
244
230 foreach (IApplicationPlugin plugin in m_plugins) 245 foreach (IApplicationPlugin plugin in m_plugins)
231 { 246 {
232 plugin.PostInitialise(); 247 plugin.PostInitialise();
@@ -385,7 +400,41 @@ namespace OpenSim
385 } 400 }
386 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); 401 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
387 402
403 if (m_securePermissionsLoading)
404 {
405 foreach (string s in m_permsModules)
406 {
407 if (!scene.RegionModules.ContainsKey(s))
408 {
409 bool found = false;
410 foreach (IRegionModule m in modules)
411 {
412 if (m.Name == s)
413 {
414 found = true;
415 }
416 }
417 if (!found)
418 {
419 m_log.Fatal("[MODULES]: Required module " + s + " not found.");
420 Environment.Exit(0);
421 }
422 }
423 }
424 }
425
388 scene.SetModuleInterfaces(); 426 scene.SetModuleInterfaces();
427// First Step of bootreport sequence
428 if (scene.SnmpService != null)
429 {
430 scene.SnmpService.ColdStart(1,scene);
431 scene.SnmpService.LinkDown(scene);
432 }
433
434 if (scene.SnmpService != null)
435 {
436 scene.SnmpService.BootInfo("Loading prins", scene);
437 }
389 438
390 while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) 439 while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null)
391 SetUpEstateOwner(scene); 440 SetUpEstateOwner(scene);
@@ -399,6 +448,11 @@ namespace OpenSim
399 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 448 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
400 scene.EventManager.TriggerParcelPrimCountUpdate(); 449 scene.EventManager.TriggerParcelPrimCountUpdate();
401 450
451 if (scene.SnmpService != null)
452 {
453 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
454 }
455
402 try 456 try
403 { 457 {
404 scene.RegisterRegionWithGrid(); 458 scene.RegisterRegionWithGrid();
@@ -409,15 +463,29 @@ namespace OpenSim
409 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", 463 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
410 e.Message, e.StackTrace); 464 e.Message, e.StackTrace);
411 465
466 if (scene.SnmpService != null)
467 {
468 scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene);
469 }
412 // Carrying on now causes a lot of confusion down the 470 // Carrying on now causes a lot of confusion down the
413 // line - we need to get the user's attention 471 // line - we need to get the user's attention
414 Environment.Exit(1); 472 Environment.Exit(1);
415 } 473 }
416 474
475 if (scene.SnmpService != null)
476 {
477 scene.SnmpService.BootInfo("Grid Registration done", scene);
478 }
479
417 // We need to do this after we've initialized the 480 // We need to do this after we've initialized the
418 // scripting engines. 481 // scripting engines.
419 scene.CreateScriptInstances(); 482 scene.CreateScriptInstances();
420 483
484 if (scene.SnmpService != null)
485 {
486 scene.SnmpService.BootInfo("ScriptEngine started", scene);
487 }
488
421 SceneManager.Add(scene); 489 SceneManager.Add(scene);
422 490
423 if (m_autoCreateClientStack) 491 if (m_autoCreateClientStack)
@@ -426,6 +494,10 @@ namespace OpenSim
426 clientServer.Start(); 494 clientServer.Start();
427 } 495 }
428 496
497 if (scene.SnmpService != null)
498 {
499 scene.SnmpService.BootInfo("Initializing region modules", scene);
500 }
429 if (do_post_init) 501 if (do_post_init)
430 { 502 {
431 foreach (IRegionModule module in modules) 503 foreach (IRegionModule module in modules)
@@ -437,6 +509,12 @@ namespace OpenSim
437 509
438 mscene = scene; 510 mscene = scene;
439 511
512 if (scene.SnmpService != null)
513 {
514 scene.SnmpService.BootInfo("The region is operational", scene);
515 scene.SnmpService.LinkUp(scene);
516 }
517
440 scene.Start(); 518 scene.Start();
441 scene.StartScripts(); 519 scene.StartScripts();
442 520
@@ -555,6 +633,11 @@ namespace OpenSim
555 private void ShutdownRegion(Scene scene) 633 private void ShutdownRegion(Scene scene)
556 { 634 {
557 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); 635 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
636 if (scene.SnmpService != null)
637 {
638 scene.SnmpService.BootInfo("The region is shutting down", scene);
639 scene.SnmpService.LinkDown(scene);
640 }
558 IRegionModulesController controller; 641 IRegionModulesController controller;
559 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) 642 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller))
560 { 643 {