diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 92 |
2 files changed, 91 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index e5b9dcb..92ccb06 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -458,7 +458,7 @@ namespace OpenSim | |||
458 | if (alert != null) | 458 | if (alert != null) |
459 | presence.ControllingClient.Kick(alert); | 459 | presence.ControllingClient.Kick(alert); |
460 | else | 460 | else |
461 | presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); | 461 | presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); |
462 | 462 | ||
463 | // ...and close on our side | 463 | // ...and close on our side |
464 | presence.Scene.IncomingCloseAgent(presence.UUID); | 464 | presence.Scene.IncomingCloseAgent(presence.UUID); |
@@ -1161,7 +1161,7 @@ namespace OpenSim | |||
1161 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); | 1161 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); |
1162 | } | 1162 | } |
1163 | } | 1163 | } |
1164 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[2], generateNewIDS, loadOffset); | 1164 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); |
1165 | } | 1165 | } |
1166 | else | 1166 | else |
1167 | { | 1167 | { |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 3060169..85870f0 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -91,6 +91,10 @@ namespace OpenSim | |||
91 | 91 | ||
92 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); | 92 | protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); |
93 | 93 | ||
94 | private List<string> m_permsModules; | ||
95 | |||
96 | private bool m_securePermissionsLoading = true; | ||
97 | |||
94 | /// <value> | 98 | /// <value> |
95 | /// The config information passed into the OpenSimulator region server. | 99 | /// The config information passed into the OpenSimulator region server. |
96 | /// </value> | 100 | /// </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 |
@@ -216,6 +225,12 @@ namespace OpenSim | |||
216 | m_moduleLoader = new ModuleLoader(m_config.Source); | 225 | m_moduleLoader = new ModuleLoader(m_config.Source); |
217 | 226 | ||
218 | LoadPlugins(); | 227 | LoadPlugins(); |
228 | |||
229 | if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch! | ||
230 | { | ||
231 | Environment.Exit(1); | ||
232 | } | ||
233 | |||
219 | foreach (IApplicationPlugin plugin in m_plugins) | 234 | foreach (IApplicationPlugin plugin in m_plugins) |
220 | { | 235 | { |
221 | plugin.PostInitialise(); | 236 | plugin.PostInitialise(); |
@@ -363,7 +378,41 @@ namespace OpenSim | |||
363 | } | 378 | } |
364 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); | 379 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); |
365 | 380 | ||
381 | if (m_securePermissionsLoading) | ||
382 | { | ||
383 | foreach (string s in m_permsModules) | ||
384 | { | ||
385 | if (!scene.RegionModules.ContainsKey(s)) | ||
386 | { | ||
387 | bool found = false; | ||
388 | foreach (IRegionModule m in modules) | ||
389 | { | ||
390 | if (m.Name == s) | ||
391 | { | ||
392 | found = true; | ||
393 | } | ||
394 | } | ||
395 | if (!found) | ||
396 | { | ||
397 | m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
398 | Environment.Exit(0); | ||
399 | } | ||
400 | } | ||
401 | } | ||
402 | } | ||
403 | |||
366 | scene.SetModuleInterfaces(); | 404 | scene.SetModuleInterfaces(); |
405 | // First Step of bootreport sequence | ||
406 | if (scene.SnmpService != null) | ||
407 | { | ||
408 | scene.SnmpService.ColdStart(1,scene); | ||
409 | scene.SnmpService.LinkDown(scene); | ||
410 | } | ||
411 | |||
412 | if (scene.SnmpService != null) | ||
413 | { | ||
414 | scene.SnmpService.BootInfo("Loading prins", scene); | ||
415 | } | ||
367 | 416 | ||
368 | // FIXME: Put me into a separate method! | 417 | // FIXME: Put me into a separate method! |
369 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) | 418 | while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) |
@@ -418,6 +467,10 @@ namespace OpenSim | |||
418 | // TODO : Try setting resource for region xstats here on scene | 467 | // TODO : Try setting resource for region xstats here on scene |
419 | MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); | 468 | MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); |
420 | 469 | ||
470 | if (scene.SnmpService != null) | ||
471 | { | ||
472 | scene.SnmpService.BootInfo("Grid Registration in progress", scene); | ||
473 | } | ||
421 | try | 474 | try |
422 | { | 475 | { |
423 | scene.RegisterRegionWithGrid(); | 476 | scene.RegisterRegionWithGrid(); |
@@ -428,11 +481,20 @@ namespace OpenSim | |||
428 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", | 481 | "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", |
429 | e.Message, e.StackTrace); | 482 | e.Message, e.StackTrace); |
430 | 483 | ||
484 | if (scene.SnmpService != null) | ||
485 | { | ||
486 | scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); | ||
487 | } | ||
431 | // Carrying on now causes a lot of confusion down the | 488 | // Carrying on now causes a lot of confusion down the |
432 | // line - we need to get the user's attention | 489 | // line - we need to get the user's attention |
433 | Environment.Exit(1); | 490 | Environment.Exit(1); |
434 | } | 491 | } |
435 | 492 | ||
493 | if (scene.SnmpService != null) | ||
494 | { | ||
495 | scene.SnmpService.BootInfo("Grid Registration done", scene); | ||
496 | } | ||
497 | |||
436 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); | 498 | scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); |
437 | scene.EventManager.TriggerParcelPrimCountUpdate(); | 499 | scene.EventManager.TriggerParcelPrimCountUpdate(); |
438 | 500 | ||
@@ -440,6 +502,11 @@ namespace OpenSim | |||
440 | // scripting engines. | 502 | // scripting engines. |
441 | scene.CreateScriptInstances(); | 503 | scene.CreateScriptInstances(); |
442 | 504 | ||
505 | if (scene.SnmpService != null) | ||
506 | { | ||
507 | scene.SnmpService.BootInfo("ScriptEngine started", scene); | ||
508 | } | ||
509 | |||
443 | m_sceneManager.Add(scene); | 510 | m_sceneManager.Add(scene); |
444 | 511 | ||
445 | if (m_autoCreateClientStack) | 512 | if (m_autoCreateClientStack) |
@@ -448,6 +515,10 @@ namespace OpenSim | |||
448 | clientServer.Start(); | 515 | clientServer.Start(); |
449 | } | 516 | } |
450 | 517 | ||
518 | if (scene.SnmpService != null) | ||
519 | { | ||
520 | scene.SnmpService.BootInfo("Initializing region modules", scene); | ||
521 | } | ||
451 | if (do_post_init) | 522 | if (do_post_init) |
452 | { | 523 | { |
453 | foreach (IRegionModule module in modules) | 524 | foreach (IRegionModule module in modules) |
@@ -459,7 +530,14 @@ namespace OpenSim | |||
459 | 530 | ||
460 | mscene = scene; | 531 | mscene = scene; |
461 | 532 | ||
533 | if (scene.SnmpService != null) | ||
534 | { | ||
535 | scene.SnmpService.BootInfo("The region is operational", scene); | ||
536 | scene.SnmpService.LinkUp(scene); | ||
537 | } | ||
538 | |||
462 | scene.StartTimer(); | 539 | scene.StartTimer(); |
540 | scene.StartTimerWatchdog(); | ||
463 | 541 | ||
464 | scene.StartScripts(); | 542 | scene.StartScripts(); |
465 | 543 | ||
@@ -469,6 +547,11 @@ namespace OpenSim | |||
469 | private void ShutdownRegion(Scene scene) | 547 | private void ShutdownRegion(Scene scene) |
470 | { | 548 | { |
471 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); | 549 | m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); |
550 | if (scene.SnmpService != null) | ||
551 | { | ||
552 | scene.SnmpService.BootInfo("The region is shutting down", scene); | ||
553 | scene.SnmpService.LinkDown(scene); | ||
554 | } | ||
472 | IRegionModulesController controller; | 555 | IRegionModulesController controller; |
473 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) | 556 | if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) |
474 | { | 557 | { |
@@ -912,7 +995,7 @@ namespace OpenSim | |||
912 | = MainConsole.Instance.CmdPrompt( | 995 | = MainConsole.Instance.CmdPrompt( |
913 | string.Format( | 996 | string.Format( |
914 | "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), | 997 | "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), |
915 | "yes", | 998 | "no", |
916 | new List<string>() { "yes", "no" }); | 999 | new List<string>() { "yes", "no" }); |
917 | 1000 | ||
918 | if (response == "no") | 1001 | if (response == "no") |
@@ -928,12 +1011,15 @@ namespace OpenSim | |||
928 | = MainConsole.Instance.CmdPrompt( | 1011 | = MainConsole.Instance.CmdPrompt( |
929 | string.Format( | 1012 | string.Format( |
930 | "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())), | 1013 | "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())), |
931 | estateNames[0]); | 1014 | "None"); |
1015 | |||
1016 | if (response == "None") | ||
1017 | continue; | ||
932 | 1018 | ||
933 | List<int> estateIDs = EstateDataService.GetEstates(response); | 1019 | List<int> estateIDs = EstateDataService.GetEstates(response); |
934 | if (estateIDs.Count < 1) | 1020 | if (estateIDs.Count < 1) |
935 | { | 1021 | { |
936 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again."); | 1022 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again."); |
937 | continue; | 1023 | continue; |
938 | } | 1024 | } |
939 | 1025 | ||