diff options
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 84 |
2 files changed, 86 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 6fba249..aad73a3 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -479,7 +479,7 @@ namespace OpenSim | |||
479 | if (alert != null) | 479 | if (alert != null) |
480 | presence.ControllingClient.Kick(alert); | 480 | presence.ControllingClient.Kick(alert); |
481 | else | 481 | else |
482 | presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); | 482 | presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); |
483 | 483 | ||
484 | // ...and close on our side | 484 | // ...and close on our side |
485 | presence.Scene.IncomingCloseAgent(presence.UUID); | 485 | presence.Scene.IncomingCloseAgent(presence.UUID); |
@@ -1215,7 +1215,7 @@ namespace OpenSim | |||
1215 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); | 1215 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); |
1216 | } | 1216 | } |
1217 | } | 1217 | } |
1218 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[2], generateNewIDS, loadOffset); | 1218 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); |
1219 | } | 1219 | } |
1220 | else | 1220 | else |
1221 | { | 1221 | { |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index c6956fc..b304403 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 |
@@ -229,6 +238,12 @@ namespace OpenSim | |||
229 | m_moduleLoader = new ModuleLoader(m_config.Source); | 238 | m_moduleLoader = new ModuleLoader(m_config.Source); |
230 | 239 | ||
231 | LoadPlugins(); | 240 | LoadPlugins(); |
241 | |||
242 | if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! | ||
243 | { | ||
244 | Environment.Exit(1); | ||
245 | } | ||
246 | |||
232 | foreach (IApplicationPlugin plugin in m_plugins) | 247 | foreach (IApplicationPlugin plugin in m_plugins) |
233 | { | 248 | { |
234 | plugin.PostInitialise(); | 249 | plugin.PostInitialise(); |
@@ -378,7 +393,41 @@ namespace OpenSim | |||
378 | } | 393 | } |
379 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); | 394 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); |
380 | 395 | ||
396 | if (m_securePermissionsLoading) | ||
397 | { | ||
398 | foreach (string s in m_permsModules) | ||
399 | { | ||
400 | if (!scene.RegionModules.ContainsKey(s)) | ||
401 | { | ||
402 | bool found = false; | ||
403 | foreach (IRegionModule m in modules) | ||
404 | { | ||
405 | if (m.Name == s) | ||
406 | { | ||
407 | found = true; | ||
408 | } | ||
409 | } | ||
410 | if (!found) | ||
411 | { | ||
412 | m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
413 | Environment.Exit(0); | ||
414 | } | ||
415 | } | ||
416 | } | ||
417 | } | ||
418 | |||
381 | scene.SetModuleInterfaces(); | 419 | scene.SetModuleInterfaces(); |
420 | // First Step of bootreport sequence | ||
421 | if (scene.SnmpService != null) | ||
422 | { | ||
423 | scene.SnmpService.ColdStart(1,scene); | ||
424 | scene.SnmpService.LinkDown(scene); | ||
425 | } | ||
426 | |||
427 | if (scene.SnmpService != null) | ||
428 | { | ||
429 | scene.SnmpService.BootInfo("Loading prins", scene); | ||
430 | } | ||
382 | 431 | ||
383 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) | 432 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) |
384 | SetUpEstateOwner(scene); | 433 | SetUpEstateOwner(scene); |
@@ -392,6 +441,11 @@ namespace OpenSim | |||
392 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 441 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
393 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 442 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
394 | 443 | ||
444 | if (scene.SnmpService != null) | ||
445 | { | ||
446 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); | ||
447 | } | ||
448 | |||
395 | try | 449 | try |
396 | { | 450 | { |
397 | scene.RegisterRegionWithGrid(); | 451 | scene.RegisterRegionWithGrid(); |
@@ -402,15 +456,29 @@ namespace OpenSim | |||
402 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", | 456 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", |
403 | e.Message, e.StackTrace); | 457 | e.Message, e.StackTrace); |
404 | 458 | ||
459 | if (scene.SnmpService != null) | ||
460 | { | ||
461 | scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); | ||
462 | } | ||
405 | // Carrying on now causes a lot of confusion down the | 463 | // Carrying on now causes a lot of confusion down the |
406 | // line - we need to get the user's attention | 464 | // line - we need to get the user's attention |
407 | Environment.Exit(1); | 465 | Environment.Exit(1); |
408 | } | 466 | } |
409 | 467 | ||
468 | if (scene.SnmpService != null) | ||
469 | { | ||
470 | scene.SnmpService.BootInfo("Grid Registration done", scene); | ||
471 | } | ||
472 | |||
410 | // We need to do this after we've initialized the | 473 | // We need to do this after we've initialized the |
411 | // scripting engines. | 474 | // scripting engines. |
412 | scene.CreateScriptInstances(); | 475 | scene.CreateScriptInstances(); |
413 | 476 | ||
477 | if (scene.SnmpService != null) | ||
478 | { | ||
479 | scene.SnmpService.BootInfo("ScriptEngine started", scene); | ||
480 | } | ||
481 | |||
414 | m_sceneManager.Add(scene); | 482 | m_sceneManager.Add(scene); |
415 | 483 | ||
416 | if (m_autoCreateClientStack) | 484 | if (m_autoCreateClientStack) |
@@ -419,6 +487,10 @@ namespace OpenSim | |||
419 | clientServer.Start(); | 487 | clientServer.Start(); |
420 | } | 488 | } |
421 | 489 | ||
490 | if (scene.SnmpService != null) | ||
491 | { | ||
492 | scene.SnmpService.BootInfo("Initializing region modules", scene); | ||
493 | } | ||
422 | if (do_post_init) | 494 | if (do_post_init) |
423 | { | 495 | { |
424 | foreach (IRegionModule module in modules) | 496 | foreach (IRegionModule module in modules) |
@@ -430,7 +502,14 @@ namespace OpenSim | |||
430 | 502 | ||
431 | mscene = scene; | 503 | mscene = scene; |
432 | 504 | ||
505 | if (scene.SnmpService != null) | ||
506 | { | ||
507 | scene.SnmpService.BootInfo("The region is operational", scene); | ||
508 | scene.SnmpService.LinkUp(scene); | ||
509 | } | ||
510 | |||
433 | scene.StartTimer(); | 511 | scene.StartTimer(); |
512 | scene.StartTimerWatchdog(); | ||
434 | 513 | ||
435 | scene.StartScripts(); | 514 | scene.StartScripts(); |
436 | 515 | ||
@@ -549,6 +628,11 @@ namespace OpenSim | |||
549 | private void ShutdownRegion(Scene scene) | 628 | private void ShutdownRegion(Scene scene) |
550 | { | 629 | { |
551 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); | 630 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); |
631 | if (scene.SnmpService != null) | ||
632 | { | ||
633 | scene.SnmpService.BootInfo("The region is shutting down", scene); | ||
634 | scene.SnmpService.LinkDown(scene); | ||
635 | } | ||
552 | IRegionModulesController controller; | 636 | IRegionModulesController controller; |
553 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) | 637 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) |
554 | { | 638 | { |