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 6834606..072e4d3 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -430,7 +430,7 @@ namespace OpenSim
430 if (alert != null) 430 if (alert != null)
431 presence.ControllingClient.Kick(alert); 431 presence.ControllingClient.Kick(alert);
432 else 432 else
433 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 433 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
434 434
435 // ...and close on our side 435 // ...and close on our side
436 presence.Scene.IncomingCloseAgent(presence.UUID); 436 presence.Scene.IncomingCloseAgent(presence.UUID);
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index b80d17d..4ef0b1b 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,7 +351,41 @@ 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);
@@ -350,6 +393,10 @@ namespace OpenSim
350 // TODO : Try setting resource for region xstats here on scene 393 // TODO : Try setting resource for region xstats here on scene
351 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 394 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
352 395
396 if (scene.SnmpService != null)
397 {
398 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
399 }
353 try 400 try
354 { 401 {
355 scene.RegisterRegionWithGrid(); 402 scene.RegisterRegionWithGrid();
@@ -358,11 +405,20 @@ namespace OpenSim
358 { 405 {
359 m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace); 406 m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace);
360 407
408 if (scene.SnmpService != null)
409 {
410 scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene);
411 }
361 // Carrying on now causes a lot of confusion down the 412 // Carrying on now causes a lot of confusion down the
362 // line - we need to get the user's attention 413 // line - we need to get the user's attention
363 Environment.Exit(1); 414 Environment.Exit(1);
364 } 415 }
365 416
417 if (scene.SnmpService != null)
418 {
419 scene.SnmpService.BootInfo("Grid Registration done", scene);
420 }
421
366 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 422 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
367 scene.EventManager.TriggerParcelPrimCountUpdate(); 423 scene.EventManager.TriggerParcelPrimCountUpdate();
368 424
@@ -370,6 +426,11 @@ namespace OpenSim
370 // scripting engines. 426 // scripting engines.
371 scene.CreateScriptInstances(); 427 scene.CreateScriptInstances();
372 428
429 if (scene.SnmpService != null)
430 {
431 scene.SnmpService.BootInfo("ScriptEngine started", scene);
432 }
433
373 m_sceneManager.Add(scene); 434 m_sceneManager.Add(scene);
374 435
375 if (m_autoCreateClientStack) 436 if (m_autoCreateClientStack)
@@ -378,6 +439,10 @@ namespace OpenSim
378 clientServer.Start(); 439 clientServer.Start();
379 } 440 }
380 441
442 if (scene.SnmpService != null)
443 {
444 scene.SnmpService.BootInfo("Initializing region modules", scene);
445 }
381 if (do_post_init) 446 if (do_post_init)
382 { 447 {
383 foreach (IRegionModule module in modules) 448 foreach (IRegionModule module in modules)
@@ -389,6 +454,12 @@ namespace OpenSim
389 454
390 mscene = scene; 455 mscene = scene;
391 456
457 if (scene.SnmpService != null)
458 {
459 scene.SnmpService.BootInfo("The region is operational", scene);
460 scene.SnmpService.LinkUp(scene);
461 }
462
392 scene.StartTimer(); 463 scene.StartTimer();
393 464
394 return clientServer; 465 return clientServer;
@@ -397,6 +468,11 @@ namespace OpenSim
397 private void ShutdownRegion(Scene scene) 468 private void ShutdownRegion(Scene scene)
398 { 469 {
399 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); 470 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
471 if (scene.SnmpService != null)
472 {
473 scene.SnmpService.BootInfo("The region is shutting down", scene);
474 scene.SnmpService.LinkDown(scene);
475 }
400 IRegionModulesController controller; 476 IRegionModulesController controller;
401 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) 477 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller))
402 { 478 {