diff options
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 94 |
2 files changed, 90 insertions, 6 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 6ff7f01..87c2792 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -435,7 +435,7 @@ namespace OpenSim | |||
435 | if (alert != null) | 435 | if (alert != null) |
436 | presence.ControllingClient.Kick(alert); | 436 | presence.ControllingClient.Kick(alert); |
437 | else | 437 | else |
438 | presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); | 438 | presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); |
439 | 439 | ||
440 | presence.Scene.IncomingCloseAgent(presence.UUID, force); | 440 | presence.Scene.IncomingCloseAgent(presence.UUID, force); |
441 | } | 441 | } |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 7ca87a3..11cacac 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> |
@@ -188,6 +192,11 @@ namespace OpenSim | |||
188 | CreatePIDFile(pidFile); | 192 | CreatePIDFile(pidFile); |
189 | 193 | ||
190 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); | 194 | userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); |
195 | |||
196 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); | ||
197 | |||
198 | string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule"); | ||
199 | m_permsModules = new List<string>(permissionModules.Split(',')); | ||
191 | } | 200 | } |
192 | 201 | ||
193 | // Load the simulation data service | 202 | // Load the simulation data service |
@@ -225,6 +234,12 @@ namespace OpenSim | |||
225 | base.StartupSpecific(); | 234 | base.StartupSpecific(); |
226 | 235 | ||
227 | LoadPlugins(); | 236 | LoadPlugins(); |
237 | |||
238 | if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! | ||
239 | { | ||
240 | Environment.Exit(1); | ||
241 | } | ||
242 | |||
228 | foreach (IApplicationPlugin plugin in m_plugins) | 243 | foreach (IApplicationPlugin plugin in m_plugins) |
229 | { | 244 | { |
230 | plugin.PostInitialise(); | 245 | plugin.PostInitialise(); |
@@ -248,10 +263,10 @@ namespace OpenSim | |||
248 | "help " + capitalizedTopic, | 263 | "help " + capitalizedTopic, |
249 | "Get help on plugin command '" + topic + "'", | 264 | "Get help on plugin command '" + topic + "'", |
250 | HandleCommanderHelp); | 265 | HandleCommanderHelp); |
251 | console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, | 266 | // console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, |
252 | "help " + capitalizedTopic, | 267 | // "help " + capitalizedTopic, |
253 | "Get help on plugin command '" + topic + "'", | 268 | // "Get help on plugin command '" + topic + "'", |
254 | HandleCommanderHelp); | 269 | // HandleCommanderHelp); |
255 | 270 | ||
256 | ICommander commander = null; | 271 | ICommander commander = null; |
257 | 272 | ||
@@ -374,7 +389,42 @@ namespace OpenSim | |||
374 | } | 389 | } |
375 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); | 390 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); |
376 | 391 | ||
392 | // XPTO: Fix this | ||
393 | // if (m_securePermissionsLoading) | ||
394 | // { | ||
395 | // foreach (string s in m_permsModules) | ||
396 | // { | ||
397 | // if (!scene.RegionModules.ContainsKey(s)) | ||
398 | // { | ||
399 | // bool found = false; | ||
400 | // foreach (IRegionModule m in modules) | ||
401 | // { | ||
402 | // if (m.Name == s) | ||
403 | // { | ||
404 | // found = true; | ||
405 | // } | ||
406 | // } | ||
407 | // if (!found) | ||
408 | // { | ||
409 | // m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
410 | // Environment.Exit(0); | ||
411 | // } | ||
412 | // } | ||
413 | // } | ||
414 | // } | ||
415 | |||
377 | scene.SetModuleInterfaces(); | 416 | scene.SetModuleInterfaces(); |
417 | // First Step of bootreport sequence | ||
418 | if (scene.SnmpService != null) | ||
419 | { | ||
420 | scene.SnmpService.ColdStart(1,scene); | ||
421 | scene.SnmpService.LinkDown(scene); | ||
422 | } | ||
423 | |||
424 | if (scene.SnmpService != null) | ||
425 | { | ||
426 | scene.SnmpService.BootInfo("Loading prins", scene); | ||
427 | } | ||
378 | 428 | ||
379 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) | 429 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) |
380 | SetUpEstateOwner(scene); | 430 | SetUpEstateOwner(scene); |
@@ -388,6 +438,11 @@ namespace OpenSim | |||
388 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 438 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
389 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 439 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
390 | 440 | ||
441 | if (scene.SnmpService != null) | ||
442 | { | ||
443 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); | ||
444 | } | ||
445 | |||
391 | try | 446 | try |
392 | { | 447 | { |
393 | scene.RegisterRegionWithGrid(); | 448 | scene.RegisterRegionWithGrid(); |
@@ -398,15 +453,29 @@ namespace OpenSim | |||
398 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", | 453 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", |
399 | e.Message, e.StackTrace); | 454 | e.Message, e.StackTrace); |
400 | 455 | ||
456 | if (scene.SnmpService != null) | ||
457 | { | ||
458 | scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); | ||
459 | } | ||
401 | // Carrying on now causes a lot of confusion down the | 460 | // Carrying on now causes a lot of confusion down the |
402 | // line - we need to get the user's attention | 461 | // line - we need to get the user's attention |
403 | Environment.Exit(1); | 462 | Environment.Exit(1); |
404 | } | 463 | } |
405 | 464 | ||
465 | if (scene.SnmpService != null) | ||
466 | { | ||
467 | scene.SnmpService.BootInfo("Grid Registration done", scene); | ||
468 | } | ||
469 | |||
406 | // We need to do this after we've initialized the | 470 | // We need to do this after we've initialized the |
407 | // scripting engines. | 471 | // scripting engines. |
408 | scene.CreateScriptInstances(); | 472 | scene.CreateScriptInstances(); |
409 | 473 | ||
474 | if (scene.SnmpService != null) | ||
475 | { | ||
476 | scene.SnmpService.BootInfo("ScriptEngine started", scene); | ||
477 | } | ||
478 | |||
410 | SceneManager.Add(scene); | 479 | SceneManager.Add(scene); |
411 | 480 | ||
412 | if (m_autoCreateClientStack) | 481 | if (m_autoCreateClientStack) |
@@ -418,10 +487,20 @@ namespace OpenSim | |||
418 | } | 487 | } |
419 | } | 488 | } |
420 | 489 | ||
490 | if (scene.SnmpService != null) | ||
491 | { | ||
492 | scene.SnmpService.BootInfo("Initializing region modules", scene); | ||
493 | } | ||
421 | scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; | 494 | scene.EventManager.OnShutdown += delegate() { ShutdownRegion(scene); }; |
422 | 495 | ||
423 | mscene = scene; | 496 | mscene = scene; |
424 | 497 | ||
498 | if (scene.SnmpService != null) | ||
499 | { | ||
500 | scene.SnmpService.BootInfo("The region is operational", scene); | ||
501 | scene.SnmpService.LinkUp(scene); | ||
502 | } | ||
503 | |||
425 | return clientServers; | 504 | return clientServers; |
426 | } | 505 | } |
427 | 506 | ||
@@ -537,6 +616,11 @@ namespace OpenSim | |||
537 | private void ShutdownRegion(Scene scene) | 616 | private void ShutdownRegion(Scene scene) |
538 | { | 617 | { |
539 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); | 618 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); |
619 | if (scene.SnmpService != null) | ||
620 | { | ||
621 | scene.SnmpService.BootInfo("The region is shutting down", scene); | ||
622 | scene.SnmpService.LinkDown(scene); | ||
623 | } | ||
540 | IRegionModulesController controller; | 624 | IRegionModulesController controller; |
541 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) | 625 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) |
542 | { | 626 | { |
@@ -1086,4 +1170,4 @@ namespace OpenSim | |||
1086 | { | 1170 | { |
1087 | public IConfigSource Source; | 1171 | public IConfigSource Source; |
1088 | } | 1172 | } |
1089 | } \ No newline at end of file | 1173 | } |