aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs92
2 files changed, 91 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 09958b1..9d3a1cd 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -454,7 +454,7 @@ namespace OpenSim
454 if (alert != null) 454 if (alert != null)
455 presence.ControllingClient.Kick(alert); 455 presence.ControllingClient.Kick(alert);
456 else 456 else
457 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 457 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
458 458
459 // ...and close on our side 459 // ...and close on our side
460 presence.Scene.IncomingCloseAgent(presence.UUID); 460 presence.Scene.IncomingCloseAgent(presence.UUID);
@@ -1152,7 +1152,7 @@ namespace OpenSim
1152 MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); 1152 MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z));
1153 } 1153 }
1154 } 1154 }
1155 m_sceneManager.LoadCurrentSceneFromXml(cmdparams[2], generateNewIDS, loadOffset); 1155 m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
1156 } 1156 }
1157 else 1157 else
1158 { 1158 {
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index e867bc2..5918843 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -92,6 +92,10 @@ namespace OpenSim
92 92
93 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); 93 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
94 94
95 private List<string> m_permsModules;
96
97 private bool m_securePermissionsLoading = true;
98
95 /// <value> 99 /// <value>
96 /// The config information passed into the OpenSimulator region server. 100 /// The config information passed into the OpenSimulator region server.
97 /// </value> 101 /// </value>
@@ -189,6 +193,11 @@ 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 = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule");
200 m_permsModules = new List<string>(permissionModules.Split(','));
192 } 201 }
193 202
194 // Load the simulation data service 203 // Load the simulation data service
@@ -217,6 +226,12 @@ namespace OpenSim
217 m_moduleLoader = new ModuleLoader(m_config.Source); 226 m_moduleLoader = new ModuleLoader(m_config.Source);
218 227
219 LoadPlugins(); 228 LoadPlugins();
229
230 if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch!
231 {
232 Environment.Exit(1);
233 }
234
220 foreach (IApplicationPlugin plugin in m_plugins) 235 foreach (IApplicationPlugin plugin in m_plugins)
221 { 236 {
222 plugin.PostInitialise(); 237 plugin.PostInitialise();
@@ -364,7 +379,41 @@ namespace OpenSim
364 } 379 }
365 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); 380 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
366 381
382 if (m_securePermissionsLoading)
383 {
384 foreach (string s in m_permsModules)
385 {
386 if (!scene.RegionModules.ContainsKey(s))
387 {
388 bool found = false;
389 foreach (IRegionModule m in modules)
390 {
391 if (m.Name == s)
392 {
393 found = true;
394 }
395 }
396 if (!found)
397 {
398 m_log.Fatal("[MODULES]: Required module " + s + " not found.");
399 Environment.Exit(0);
400 }
401 }
402 }
403 }
404
367 scene.SetModuleInterfaces(); 405 scene.SetModuleInterfaces();
406// First Step of bootreport sequence
407 if (scene.SnmpService != null)
408 {
409 scene.SnmpService.ColdStart(1,scene);
410 scene.SnmpService.LinkDown(scene);
411 }
412
413 if (scene.SnmpService != null)
414 {
415 scene.SnmpService.BootInfo("Loading prins", scene);
416 }
368 417
369 while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) 418 while (regionInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null)
370 SetUpEstateOwner(scene); 419 SetUpEstateOwner(scene);
@@ -375,6 +424,10 @@ namespace OpenSim
375 // TODO : Try setting resource for region xstats here on scene 424 // TODO : Try setting resource for region xstats here on scene
376 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 425 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
377 426
427 if (scene.SnmpService != null)
428 {
429 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
430 }
378 try 431 try
379 { 432 {
380 scene.RegisterRegionWithGrid(); 433 scene.RegisterRegionWithGrid();
@@ -385,11 +438,20 @@ namespace OpenSim
385 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", 438 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
386 e.Message, e.StackTrace); 439 e.Message, e.StackTrace);
387 440
441 if (scene.SnmpService != null)
442 {
443 scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene);
444 }
388 // Carrying on now causes a lot of confusion down the 445 // Carrying on now causes a lot of confusion down the
389 // line - we need to get the user's attention 446 // line - we need to get the user's attention
390 Environment.Exit(1); 447 Environment.Exit(1);
391 } 448 }
392 449
450 if (scene.SnmpService != null)
451 {
452 scene.SnmpService.BootInfo("Grid Registration done", scene);
453 }
454
393 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 455 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
394 scene.EventManager.TriggerParcelPrimCountUpdate(); 456 scene.EventManager.TriggerParcelPrimCountUpdate();
395 457
@@ -397,6 +459,11 @@ namespace OpenSim
397 // scripting engines. 459 // scripting engines.
398 scene.CreateScriptInstances(); 460 scene.CreateScriptInstances();
399 461
462 if (scene.SnmpService != null)
463 {
464 scene.SnmpService.BootInfo("ScriptEngine started", scene);
465 }
466
400 m_sceneManager.Add(scene); 467 m_sceneManager.Add(scene);
401 468
402 if (m_autoCreateClientStack) 469 if (m_autoCreateClientStack)
@@ -405,6 +472,10 @@ namespace OpenSim
405 clientServer.Start(); 472 clientServer.Start();
406 } 473 }
407 474
475 if (scene.SnmpService != null)
476 {
477 scene.SnmpService.BootInfo("Initializing region modules", scene);
478 }
408 if (do_post_init) 479 if (do_post_init)
409 { 480 {
410 foreach (IRegionModule module in modules) 481 foreach (IRegionModule module in modules)
@@ -416,7 +487,14 @@ namespace OpenSim
416 487
417 mscene = scene; 488 mscene = scene;
418 489
490 if (scene.SnmpService != null)
491 {
492 scene.SnmpService.BootInfo("The region is operational", scene);
493 scene.SnmpService.LinkUp(scene);
494 }
495
419 scene.StartTimer(); 496 scene.StartTimer();
497 scene.StartTimerWatchdog();
420 498
421 scene.StartScripts(); 499 scene.StartScripts();
422 500
@@ -493,6 +571,11 @@ namespace OpenSim
493 private void ShutdownRegion(Scene scene) 571 private void ShutdownRegion(Scene scene)
494 { 572 {
495 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); 573 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
574 if (scene.SnmpService != null)
575 {
576 scene.SnmpService.BootInfo("The region is shutting down", scene);
577 scene.SnmpService.LinkDown(scene);
578 }
496 IRegionModulesController controller; 579 IRegionModulesController controller;
497 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) 580 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller))
498 { 581 {
@@ -936,7 +1019,7 @@ namespace OpenSim
936 = MainConsole.Instance.CmdPrompt( 1019 = MainConsole.Instance.CmdPrompt(
937 string.Format( 1020 string.Format(
938 "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), 1021 "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName),
939 "yes", 1022 "no",
940 new List<string>() { "yes", "no" }); 1023 new List<string>() { "yes", "no" });
941 1024
942 if (response == "no") 1025 if (response == "no")
@@ -952,12 +1035,15 @@ namespace OpenSim
952 = MainConsole.Instance.CmdPrompt( 1035 = MainConsole.Instance.CmdPrompt(
953 string.Format( 1036 string.Format(
954 "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())), 1037 "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())),
955 estateNames[0]); 1038 "None");
1039
1040 if (response == "None")
1041 continue;
956 1042
957 List<int> estateIDs = EstateDataService.GetEstates(response); 1043 List<int> estateIDs = EstateDataService.GetEstates(response);
958 if (estateIDs.Count < 1) 1044 if (estateIDs.Count < 1)
959 { 1045 {
960 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again."); 1046 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again.");
961 continue; 1047 continue;
962 } 1048 }
963 1049