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 fe1525b..fae8be7 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -456,7 +456,7 @@ namespace OpenSim
456 if (alert != null) 456 if (alert != null)
457 presence.ControllingClient.Kick(alert); 457 presence.ControllingClient.Kick(alert);
458 else 458 else
459 presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); 459 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
460 460
461 // ...and close on our side 461 // ...and close on our side
462 presence.Scene.IncomingCloseAgent(presence.UUID); 462 presence.Scene.IncomingCloseAgent(presence.UUID);
@@ -1159,7 +1159,7 @@ namespace OpenSim
1159 MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); 1159 MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z));
1160 } 1160 }
1161 } 1161 }
1162 m_sceneManager.LoadCurrentSceneFromXml(cmdparams[2], generateNewIDS, loadOffset); 1162 m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset);
1163 } 1163 }
1164 else 1164 else
1165 { 1165 {
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 00b080c..dbfd0f2 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -88,6 +88,10 @@ namespace OpenSim
88 88
89 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); 89 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
90 90
91 private List<string> m_permsModules;
92
93 private bool m_securePermissionsLoading = true;
94
91 /// <value> 95 /// <value>
92 /// The config information passed into the OpenSimulator region server. 96 /// The config information passed into the OpenSimulator region server.
93 /// </value> 97 /// </value>
@@ -185,6 +189,11 @@ namespace OpenSim
185 CreatePIDFile(pidFile); 189 CreatePIDFile(pidFile);
186 190
187 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty); 191 userStatsURI = startupConfig.GetString("Stats_URI", String.Empty);
192
193 m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true);
194
195 string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule");
196 m_permsModules = new List<string>(permissionModules.Split(','));
188 } 197 }
189 198
190 // Load the simulation data service 199 // Load the simulation data service
@@ -213,6 +222,12 @@ namespace OpenSim
213 m_moduleLoader = new ModuleLoader(m_config.Source); 222 m_moduleLoader = new ModuleLoader(m_config.Source);
214 223
215 LoadPlugins(); 224 LoadPlugins();
225
226 if (m_plugins.Count == 0) // We failed to load any modules. Mono Addins glitch!
227 {
228 Environment.Exit(1);
229 }
230
216 foreach (IApplicationPlugin plugin in m_plugins) 231 foreach (IApplicationPlugin plugin in m_plugins)
217 { 232 {
218 plugin.PostInitialise(); 233 plugin.PostInitialise();
@@ -360,7 +375,41 @@ namespace OpenSim
360 } 375 }
361 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); 376 else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing...");
362 377
378 if (m_securePermissionsLoading)
379 {
380 foreach (string s in m_permsModules)
381 {
382 if (!scene.RegionModules.ContainsKey(s))
383 {
384 bool found = false;
385 foreach (IRegionModule m in modules)
386 {
387 if (m.Name == s)
388 {
389 found = true;
390 }
391 }
392 if (!found)
393 {
394 m_log.Fatal("[MODULES]: Required module " + s + " not found.");
395 Environment.Exit(0);
396 }
397 }
398 }
399 }
400
363 scene.SetModuleInterfaces(); 401 scene.SetModuleInterfaces();
402// First Step of bootreport sequence
403 if (scene.SnmpService != null)
404 {
405 scene.SnmpService.ColdStart(1,scene);
406 scene.SnmpService.LinkDown(scene);
407 }
408
409 if (scene.SnmpService != null)
410 {
411 scene.SnmpService.BootInfo("Loading prins", scene);
412 }
364 413
365 // Prims have to be loaded after module configuration since some modules may be invoked during the load 414 // Prims have to be loaded after module configuration since some modules may be invoked during the load
366 scene.LoadPrimsFromStorage(regionInfo.originRegionID); 415 scene.LoadPrimsFromStorage(regionInfo.originRegionID);
@@ -368,6 +417,10 @@ namespace OpenSim
368 // TODO : Try setting resource for region xstats here on scene 417 // TODO : Try setting resource for region xstats here on scene
369 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 418 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
370 419
420 if (scene.SnmpService != null)
421 {
422 scene.SnmpService.BootInfo("Grid Registration in progress", scene);
423 }
371 try 424 try
372 { 425 {
373 scene.RegisterRegionWithGrid(); 426 scene.RegisterRegionWithGrid();
@@ -378,11 +431,20 @@ namespace OpenSim
378 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}", 431 "[STARTUP]: Registration of region with grid failed, aborting startup due to {0} {1}",
379 e.Message, e.StackTrace); 432 e.Message, e.StackTrace);
380 433
434 if (scene.SnmpService != null)
435 {
436 scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene);
437 }
381 // Carrying on now causes a lot of confusion down the 438 // Carrying on now causes a lot of confusion down the
382 // line - we need to get the user's attention 439 // line - we need to get the user's attention
383 Environment.Exit(1); 440 Environment.Exit(1);
384 } 441 }
385 442
443 if (scene.SnmpService != null)
444 {
445 scene.SnmpService.BootInfo("Grid Registration done", scene);
446 }
447
386 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 448 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
387 scene.EventManager.TriggerParcelPrimCountUpdate(); 449 scene.EventManager.TriggerParcelPrimCountUpdate();
388 450
@@ -390,6 +452,11 @@ namespace OpenSim
390 // scripting engines. 452 // scripting engines.
391 scene.CreateScriptInstances(); 453 scene.CreateScriptInstances();
392 454
455 if (scene.SnmpService != null)
456 {
457 scene.SnmpService.BootInfo("ScriptEngine started", scene);
458 }
459
393 m_sceneManager.Add(scene); 460 m_sceneManager.Add(scene);
394 461
395 if (m_autoCreateClientStack) 462 if (m_autoCreateClientStack)
@@ -398,6 +465,10 @@ namespace OpenSim
398 clientServer.Start(); 465 clientServer.Start();
399 } 466 }
400 467
468 if (scene.SnmpService != null)
469 {
470 scene.SnmpService.BootInfo("Initializing region modules", scene);
471 }
401 if (do_post_init) 472 if (do_post_init)
402 { 473 {
403 foreach (IRegionModule module in modules) 474 foreach (IRegionModule module in modules)
@@ -409,7 +480,14 @@ namespace OpenSim
409 480
410 mscene = scene; 481 mscene = scene;
411 482
483 if (scene.SnmpService != null)
484 {
485 scene.SnmpService.BootInfo("The region is operational", scene);
486 scene.SnmpService.LinkUp(scene);
487 }
488
412 scene.StartTimer(); 489 scene.StartTimer();
490 scene.StartTimerWatchdog();
413 491
414 return clientServer; 492 return clientServer;
415 } 493 }
@@ -417,6 +495,11 @@ namespace OpenSim
417 private void ShutdownRegion(Scene scene) 495 private void ShutdownRegion(Scene scene)
418 { 496 {
419 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName); 497 m_log.DebugFormat("[SHUTDOWN]: Shutting down region {0}", scene.RegionInfo.RegionName);
498 if (scene.SnmpService != null)
499 {
500 scene.SnmpService.BootInfo("The region is shutting down", scene);
501 scene.SnmpService.LinkDown(scene);
502 }
420 IRegionModulesController controller; 503 IRegionModulesController controller;
421 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller)) 504 if (ApplicationRegistry.TryGet<IRegionModulesController>(out controller))
422 { 505 {
@@ -860,7 +943,7 @@ namespace OpenSim
860 = MainConsole.Instance.CmdPrompt( 943 = MainConsole.Instance.CmdPrompt(
861 string.Format( 944 string.Format(
862 "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName), 945 "Do you wish to join region {0} to an existing estate (yes/no)?", regInfo.RegionName),
863 "yes", 946 "no",
864 new List<string>() { "yes", "no" }); 947 new List<string>() { "yes", "no" });
865 948
866 if (response == "no") 949 if (response == "no")
@@ -876,12 +959,15 @@ namespace OpenSim
876 = MainConsole.Instance.CmdPrompt( 959 = MainConsole.Instance.CmdPrompt(
877 string.Format( 960 string.Format(
878 "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())), 961 "Name of estate to join. Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())),
879 estateNames[0]); 962 "None");
963
964 if (response == "None")
965 continue;
880 966
881 List<int> estateIDs = EstateDataService.GetEstates(response); 967 List<int> estateIDs = EstateDataService.GetEstates(response);
882 if (estateIDs.Count < 1) 968 if (estateIDs.Count < 1)
883 { 969 {
884 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again."); 970 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again.");
885 continue; 971 continue;
886 } 972 }
887 973