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.cs76
2 files changed, 77 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 7a0142f..edbae59 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -436,7 +436,7 @@ namespace OpenSim
436 if (alert != null) 436 if (alert != null)
437 presence.ControllingClient.Kick(alert); 437 presence.ControllingClient.Kick(alert);
438 else 438 else
439 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 439 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
440 440
441 // ...and close on our side 441 // ...and close on our side
442 presence.Scene.IncomingCloseAgent(presence.UUID); 442 presence.Scene.IncomingCloseAgent(presence.UUID);
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 74ad168..c5ee385 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 // Load the simulation data service 199 // Load the simulation data service
@@ -360,7 +369,41 @@ namespace OpenSim
360 } 369 }
361 else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); 370 else m_log.Error("[MODULES]: The new RegionModulesController is missing...");
362 371
372 if (m_securePermissionsLoading)
373 {
374 foreach (string s in m_permsModules)
375 {
376 if (!scene.RegionModules.ContainsKey(s))
377 {
378 bool found = false;
379 foreach (IRegionModule m in modules)
380 {
381 if (m.Name == s)
382 {
383 found = true;
384 }
385 }
386 if (!found)
387 {
388 m_log.Fatal("[MODULES]: Required module " + s + " not found.");
389 Environment.Exit(0);
390 }
391 }
392 }
393 }
394
363 scene.SetModuleInterfaces(); 395 scene.SetModuleInterfaces();
396// First Step of bootreport sequence
397 if (scene.SnmpService != null)
398 {
399 scene.SnmpService.ColdStart(1,scene);
400 scene.SnmpService.LinkDown(scene);
401 }
402
403 if (scene.SnmpService != null)
404 {
405 scene.SnmpService.BootInfo("Loading prins", scene);
406 }
364 407
365 // Prims have to be loaded after module configuration since some modules may be invoked during the load 408 // Prims have to be loaded after module configuration since some modules may be invoked during the load
366 scene.LoadPrimsFromStorage(regionInfo.originRegionID); 409 scene.LoadPrimsFromStorage(regionInfo.originRegionID);
@@ -368,6 +411,10 @@ namespace OpenSim
368 // TODO : Try setting resource for region xstats here on scene 411 // TODO : Try setting resource for region xstats here on scene
369 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 412 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
370 413
414 if (scene.SnmpService != null)
415 {
416 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
417 }
371 try 418 try
372 { 419 {
373 scene.RegisterRegionWithGrid(); 420 scene.RegisterRegionWithGrid();
@@ -378,11 +425,20 @@ namespace OpenSim
378 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", 425 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
379 e.Message, e.StackTrace); 426 e.Message, e.StackTrace);
380 427
428 if (scene.SnmpService != null)
429 {
430 scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene);
431 }
381 // Carrying on now causes a lot of confusion down the 432 // Carrying on now causes a lot of confusion down the
382 // line - we need to get the user's attention 433 // line - we need to get the user's attention
383 Environment.Exit(1); 434 Environment.Exit(1);
384 } 435 }
385 436
437 if (scene.SnmpService != null)
438 {
439 scene.SnmpService.BootInfo("Grid Registration done", scene);
440 }
441
386 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 442 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
387 scene.EventManager.TriggerParcelPrimCountUpdate(); 443 scene.EventManager.TriggerParcelPrimCountUpdate();
388 444
@@ -390,6 +446,11 @@ namespace OpenSim
390 // scripting engines. 446 // scripting engines.
391 scene.CreateScriptInstances(); 447 scene.CreateScriptInstances();
392 448
449 if (scene.SnmpService != null)
450 {
451 scene.SnmpService.BootInfo("ScriptEngine started", scene);
452 }
453
393 m_sceneManager.Add(scene); 454 m_sceneManager.Add(scene);
394 455
395 if (m_autoCreateClientStack) 456 if (m_autoCreateClientStack)
@@ -398,6 +459,10 @@ namespace OpenSim
398 clientServer.Start(); 459 clientServer.Start();
399 } 460 }
400 461
462 if (scene.SnmpService != null)
463 {
464 scene.SnmpService.BootInfo("Initializing region modules", scene);
465 }
401 if (do_post_init) 466 if (do_post_init)
402 { 467 {
403 foreach (IRegionModule module in modules) 468 foreach (IRegionModule module in modules)
@@ -409,6 +474,12 @@ namespace OpenSim
409 474
410 mscene = scene; 475 mscene = scene;
411 476
477 if (scene.SnmpService != null)
478 {
479 scene.SnmpService.BootInfo("The region is operational", scene);
480 scene.SnmpService.LinkUp(scene);
481 }
482
412 scene.StartTimer(); 483 scene.StartTimer();
413 484
414 return clientServer; 485 return clientServer;
@@ -417,6 +488,11 @@ namespace OpenSim
417 private void ShutdownRegion(Scene scene) 488 private void ShutdownRegion(Scene scene)
418 { 489 {
419 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); 490 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
491 if (scene.SnmpService != null)
492 {
493 scene.SnmpService.BootInfo("The region is shutting down", scene);
494 scene.SnmpService.LinkDown(scene);
495 }
420 IRegionModulesController controller; 496 IRegionModulesController controller;
421 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) 497 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller))
422 { 498 {