aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorMelanie2010-08-18 00:59:20 +0100
committerMelanie2010-08-18 00:59:20 +0100
commite74809ff4c7fd67ceb5336e5d8e7811591f6cce3 (patch)
tree3e878fb80be75106631d76a12b8da9e65e98f7b9 /OpenSim/Region/Application
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parent* Changed a few OSD.FromBinary() calls to the more accurate OSD.FromULong() t... (diff)
downloadopensim-SC-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.zip
opensim-SC-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.tar.gz
opensim-SC-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.tar.bz2
opensim-SC-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs12
-rw-r--r--OpenSim/Region/Application/OpenSim.cs16
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs62
3 files changed, 82 insertions, 8 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 09f7bea..e69e3fc 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -211,7 +211,17 @@ namespace OpenSim
211 else 211 else
212 { 212 {
213 string basepath = Path.GetFullPath(Util.configDir()); 213 string basepath = Path.GetFullPath(Util.configDir());
214 string path = Path.Combine(basepath, file); 214 // Resolve relative paths with wildcards
215 string chunkWithoutWildcards = file;
216 string chunkWithWildcards = string.Empty;
217 int wildcardIndex = file.IndexOfAny(new char[] { '*', '?' });
218 if (wildcardIndex != -1)
219 {
220 chunkWithoutWildcards = file.Substring(0, wildcardIndex);
221 chunkWithWildcards = file.Substring(wildcardIndex);
222 }
223 string path = Path.Combine(basepath, chunkWithoutWildcards);
224 path = Path.GetFullPath(path) + chunkWithWildcards;
215 string[] paths = Util.Glob(path); 225 string[] paths = Util.Glob(path);
216 foreach (string p in paths) 226 foreach (string p in paths)
217 { 227 {
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index cb48ac1..bbc42e6 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -418,7 +418,7 @@ namespace OpenSim
418 { 418 {
419 MainConsole.Instance.Output( 419 MainConsole.Instance.Output(
420 String.Format( 420 String.Format(
421 "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", 421 "Kicking user: {0,-16} {1,-16} {2,-37} in region: {3,-16}",
422 presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName)); 422 presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName));
423 423
424 // kick client... 424 // kick client...
@@ -530,7 +530,10 @@ namespace OpenSim
530 regionFile = cmd[3]; 530 regionFile = cmd[3];
531 531
532 IScene scene; 532 IScene scene;
533 CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene); 533 RegionInfo regInfo = new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source);
534 PopulateRegionEstateInfo(regInfo);
535 CreateRegion(regInfo, true, out scene);
536 regInfo.EstateSettings.Save();
534 } 537 }
535 else if (cmd[3].EndsWith(".ini")) 538 else if (cmd[3].EndsWith(".ini"))
536 { 539 {
@@ -541,7 +544,10 @@ namespace OpenSim
541 regionFile = cmd[3]; 544 regionFile = cmd[3];
542 545
543 IScene scene; 546 IScene scene;
544 CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source, cmd[2]), true, out scene); 547 RegionInfo regInfo = new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source, cmd[2]);
548 PopulateRegionEstateInfo(regInfo);
549 CreateRegion(regInfo, true, out scene);
550 regInfo.EstateSettings.Save();
545 } 551 }
546 else 552 else
547 { 553 {
@@ -861,7 +867,7 @@ namespace OpenSim
861 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); 867 MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count));
862 868
863 MainConsole.Instance.Output( 869 MainConsole.Instance.Output(
864 String.Format("{0,-16}{1,-16}{2,-37}{3,-11}{4,-16}{5,-30}", "Firstname", "Lastname", 870 String.Format("{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}", "Firstname", "Lastname",
865 "Agent ID", "Root/Child", "Region", "Position")); 871 "Agent ID", "Root/Child", "Region", "Position"));
866 872
867 foreach (ScenePresence presence in agents) 873 foreach (ScenePresence presence in agents)
@@ -880,7 +886,7 @@ namespace OpenSim
880 886
881 MainConsole.Instance.Output( 887 MainConsole.Instance.Output(
882 String.Format( 888 String.Format(
883 "{0,-16}{1,-16}{2,-37}{3,-11}{4,-16}{5,-30}", 889 "{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}",
884 presence.Firstname, 890 presence.Firstname,
885 presence.Lastname, 891 presence.Lastname,
886 presence.UUID, 892 presence.UUID,
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