aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs87
2 files changed, 83 insertions, 6 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index c2d9942..2aed61f 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -455,7 +455,7 @@ namespace OpenSim
455 if (alert != null) 455 if (alert != null)
456 presence.ControllingClient.Kick(alert); 456 presence.ControllingClient.Kick(alert);
457 else 457 else
458 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 458 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
459 459
460 presence.Scene.CloseAgent(presence.UUID, force); 460 presence.Scene.CloseAgent(presence.UUID, force);
461 break; 461 break;
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 308638c..f663c77 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -98,6 +98,10 @@ namespace OpenSim
98 98
99 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); 99 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
100 100
101 private List<string> m_permsModules;
102
103 private bool m_securePermissionsLoading = true;
104
101 /// <value> 105 /// <value>
102 /// The config information passed into the OpenSimulator region server. 106 /// The config information passed into the OpenSimulator region server.
103 /// </value> 107 /// </value>
@@ -189,6 +193,14 @@ namespace OpenSim
189 CreatePIDFile(pidFile); 193 CreatePIDFile(pidFile);
190 194
191 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); 195 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
196
197 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
198
199 string permissionModules = Util.GetConfigVarFromSections<string>(Config, "permissionmodules",
200 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
201
202 m_permsModules = new List<string>(permissionModules.Split(','));
203
192 managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty); 204 managedStatsURI = startupConfig.GetString("ManagedStatsRemoteFetchURI", String.Empty);
193 } 205 }
194 206
@@ -227,6 +239,12 @@ namespace OpenSim
227 base.StartupSpecific(); 239 base.StartupSpecific();
228 240
229 LoadPlugins(); 241 LoadPlugins();
242
243 if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch!
244 {
245 Environment.Exit(1);
246 }
247
230 foreach (IApplicationPlugin plugin in m_plugins) 248 foreach (IApplicationPlugin plugin in m_plugins)
231 { 249 {
232 plugin.PostInitialise(); 250 plugin.PostInitialise();
@@ -250,10 +268,10 @@ namespace OpenSim
250 "help " + capitalizedTopic, 268 "help " + capitalizedTopic,
251 "Get help on plugin command '" + topic + "'", 269 "Get help on plugin command '" + topic + "'",
252 HandleCommanderHelp); 270 HandleCommanderHelp);
253 console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, 271// console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic,
254 "help " + capitalizedTopic, 272// "help " + capitalizedTopic,
255 "Get help on plugin command '" + topic + "'", 273// "Get help on plugin command '" + topic + "'",
256 HandleCommanderHelp); 274// HandleCommanderHelp);
257 275
258 ICommander commander = null; 276 ICommander commander = null;
259 277
@@ -376,7 +394,32 @@ namespace OpenSim
376 } 394 }
377 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); 395 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
378 396
397 if (m_securePermissionsLoading)
398 {
399 foreach (string s in m_permsModules)
400 {
401 if (!scene.RegionModules.ContainsKey(s))
402 {
403 m_log.Fatal("[MODULES]: Required module " + s + " not found.");
404 Environment.Exit(0);
405 }
406 }
407
408 m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules.ToArray()));
409 }
410
379 scene.SetModuleInterfaces(); 411 scene.SetModuleInterfaces();
412// First Step of bootreport sequence
413 if (scene.SnmpService != null)
414 {
415 scene.SnmpService.ColdStart(1,scene);
416 scene.SnmpService.LinkDown(scene);
417 }
418
419 if (scene.SnmpService != null)
420 {
421 scene.SnmpService.BootInfo("Loading prins", scene);
422 }
380 423
381 while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) 424 while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null)
382 SetUpEstateOwner(scene); 425 SetUpEstateOwner(scene);
@@ -390,6 +433,11 @@ namespace OpenSim
390 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 433 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
391 scene.EventManager.TriggerParcelPrimCountUpdate(); 434 scene.EventManager.TriggerParcelPrimCountUpdate();
392 435
436 if (scene.SnmpService != null)
437 {
438 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
439 }
440
393 try 441 try
394 { 442 {
395 scene.RegisterRegionWithGrid(); 443 scene.RegisterRegionWithGrid();
@@ -400,15 +448,29 @@ namespace OpenSim
400 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", 448 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
401 e.Message, e.StackTrace); 449 e.Message, e.StackTrace);
402 450
451 if (scene.SnmpService != null)
452 {
453 scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene);
454 }
403 // Carrying on now causes a lot of confusion down the 455 // Carrying on now causes a lot of confusion down the
404 // line - we need to get the user's attention 456 // line - we need to get the user's attention
405 Environment.Exit(1); 457 Environment.Exit(1);
406 } 458 }
407 459
460 if (scene.SnmpService != null)
461 {
462 scene.SnmpService.BootInfo("Grid Registration done", scene);
463 }
464
408 // We need to do this after we've initialized the 465 // We need to do this after we've initialized the
409 // scripting engines. 466 // scripting engines.
410 scene.CreateScriptInstances(); 467 scene.CreateScriptInstances();
411 468
469 if (scene.SnmpService != null)
470 {
471 scene.SnmpService.BootInfo("ScriptEngine started", scene);
472 }
473
412 SceneManager.Add(scene); 474 SceneManager.Add(scene);
413 475
414 if (m_autoCreateClientStack) 476 if (m_autoCreateClientStack)
@@ -420,10 +482,20 @@ namespace OpenSim
420 } 482 }
421 } 483 }
422 484
485 if (scene.SnmpService != null)
486 {
487 scene.SnmpService.BootInfo("Initializing region modules", scene);
488 }
423 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; 489 scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); };
424 490
425 mscene = scene; 491 mscene = scene;
426 492
493 if (scene.SnmpService != null)
494 {
495 scene.SnmpService.BootInfo("The region is operational", scene);
496 scene.SnmpService.LinkUp(scene);
497 }
498
427 return clientServers; 499 return clientServers;
428 } 500 }
429 501
@@ -539,6 +611,11 @@ namespace OpenSim
539 private void ShutdownRegion(Scene scene) 611 private void ShutdownRegion(Scene scene)
540 { 612 {
541 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); 613 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
614 if (scene.SnmpService != null)
615 {
616 scene.SnmpService.BootInfo("The region is shutting down", scene);
617 scene.SnmpService.LinkDown(scene);
618 }
542 IRegionModulesController controller; 619 IRegionModulesController controller;
543 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) 620 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller))
544 { 621 {
@@ -1048,4 +1125,4 @@ namespace OpenSim
1048 { 1125 {
1049 public IConfigSource Source; 1126 public IConfigSource Source;
1050 } 1127 }
1051} \ No newline at end of file 1128}