aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
authormeta72010-08-18 02:53:27 -0700
committermeta72010-08-18 02:53:27 -0700
commitca8b1e488c167e5644567cb001c9c2a6504f15f7 (patch)
tree2a99b396dd4ccbd6c801efc0890fad1bd94b45e2 /OpenSim/Region/Application/OpenSimBase.cs
parentFix a nullref exception in the prioritizer (diff)
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-ca8b1e488c167e5644567cb001c9c2a6504f15f7.zip
opensim-SC-ca8b1e488c167e5644567cb001c9c2a6504f15f7.tar.gz
opensim-SC-ca8b1e488c167e5644567cb001c9c2a6504f15f7.tar.bz2
opensim-SC-ca8b1e488c167e5644567cb001c9c2a6504f15f7.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs62
1 files changed, 60 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index fc67f94..c08da18 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -395,9 +395,13 @@ namespace OpenSim
395 scene.SnmpService.BootInfo("Creating region texture", scene); 395 scene.SnmpService.BootInfo("Creating region texture", scene);
396 } 396 }
397 397
398 // moved these here as the terrain texture has to be created after the modules are initialized 398 // moved these here as the map texture has to be created after the modules are initialized
399 // and has to happen before the region is registered with the grid. 399 // and has to happen before the region is registered with the grid.
400 scene.CreateTerrainTexture(); 400 IWorldMapModule mapModule = scene.RequestModuleInterface<IWorldMapModule>();
401 if (mapModule != null)
402 mapModule.GenerateMaptile();
403 else
404 m_log.WarnFormat("[STARTUP]: No map module available to generate map tile");
401 405
402 // TODO : Try setting resource for region xstats here on scene 406 // TODO : Try setting resource for region xstats here on scene
403 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 407 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
@@ -867,6 +871,60 @@ namespace OpenSim
867 { 871 {
868 regionnum = m_sceneManager.Scenes.Count; 872 regionnum = m_sceneManager.Scenes.Count;
869 } 873 }
874
875 /// <summary>
876 /// Load the estate information for the provided RegionInfo object.
877 /// </summary>
878 /// <param name="regInfo">
879 /// A <see cref="RegionInfo"/>
880 /// </param>
881 public void PopulateRegionEstateInfo(RegionInfo regInfo)
882 {
883 if (m_storageManager.EstateDataStore != null)
884 {
885 regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false);
886 }
887
888 if (regInfo.EstateSettings.EstateID == 0) // No record at all
889 {
890 MainConsole.Instance.Output("Your region is not part of an estate.");
891 while (true)
892 {
893 string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"});
894 if (response == "no")
895 {
896 // Create a new estate
897 regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true);
898
899 regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
900 //regInfo.EstateSettings.Save();
901 break;
902 }
903 else
904 {
905 response = MainConsole.Instance.CmdPrompt("Estate name to join", "None");
906 if (response == "None")
907 continue;
908
909 List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response);
910 if (estateIDs.Count < 1)
911 {
912 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again");
913 continue;
914 }
915
916 int estateID = estateIDs[0];
917
918 regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID);
919
920 if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID))
921 break;
922
923 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
924 }
925 }
926 }
927 }
870 } 928 }
871 929
872 930