aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index 2064ce3..83ec6c3 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -97,14 +97,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
97 // Hack to get around the fact that ll V3 now drops the port from the 97 // Hack to get around the fact that ll V3 now drops the port from the
98 // map name. See https://jira.secondlife.com/browse/VWR-28570 98 // map name. See https://jira.secondlife.com/browse/VWR-28570
99 // 99 //
100 // Caller, use this form instead: 100 // Caller, use this magic form instead:
101 // secondlife://mygrid.com|8002|Region+Name/128/128 101 // secondlife://http|!!mygrid.com|8002|Region+Name/128/128
102 // or url encode if possible.
102 // the hacks we do with this viewer... 103 // the hacks we do with this viewer...
103 // 104 //
105 string mapNameOrig = mapName;
104 if (mapName.Contains("|")) 106 if (mapName.Contains("|"))
105 mapName = mapName.Replace('|', ':'); 107 mapName = mapName.Replace('|', ':');
106 if (mapName.Contains("+")) 108 if (mapName.Contains("+"))
107 mapName = mapName.Replace('+', ' '); 109 mapName = mapName.Replace('+', ' ');
110 if (mapName.Contains("!"))
111 mapName = mapName.Replace('!', '/');
108 112
109 // try to fetch from GridServer 113 // try to fetch from GridServer
110 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); 114 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
@@ -126,7 +130,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
126 data.MapImageId = UUID.Zero; 130 data.MapImageId = UUID.Zero;
127 else 131 else
128 data.MapImageId = info.TerrainImage; 132 data.MapImageId = info.TerrainImage;
129 data.Name = info.RegionName; 133 // ugh! V2-3 is very sensitive about the result being
134 // exactly the same as the requested name
135 if (regionInfos.Count == 1)
136 data.Name = mapNameOrig;
137 else
138 data.Name = info.RegionName;
130 data.RegionFlags = 0; // TODO not used? 139 data.RegionFlags = 0; // TODO not used?
131 data.WaterHeight = 0; // not used 140 data.WaterHeight = 0; // not used
132 data.X = (ushort)(info.RegionLocX / Constants.RegionSize); 141 data.X = (ushort)(info.RegionLocX / Constants.RegionSize);