diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 657975b..83ec6c3 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -92,7 +92,23 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | 94 | ||
95 | //m_log.DebugFormat("MAP NAME=({0})", mapName); | 95 | //m_log.DebugFormat("MAP NAME=({0})", mapName); |
96 | |||
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 | ||
99 | // | ||
100 | // Caller, use this magic form instead: | ||
101 | // secondlife://http|!!mygrid.com|8002|Region+Name/128/128 | ||
102 | // or url encode if possible. | ||
103 | // the hacks we do with this viewer... | ||
104 | // | ||
105 | string mapNameOrig = mapName; | ||
106 | if (mapName.Contains("|")) | ||
107 | mapName = mapName.Replace('|', ':'); | ||
108 | if (mapName.Contains("+")) | ||
109 | mapName = mapName.Replace('+', ' '); | ||
110 | if (mapName.Contains("!")) | ||
111 | mapName = mapName.Replace('!', '/'); | ||
96 | 112 | ||
97 | // try to fetch from GridServer | 113 | // try to fetch from GridServer |
98 | 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); |
@@ -114,7 +130,12 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
114 | data.MapImageId = UUID.Zero; | 130 | data.MapImageId = UUID.Zero; |
115 | else | 131 | else |
116 | data.MapImageId = info.TerrainImage; | 132 | data.MapImageId = info.TerrainImage; |
117 | 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; | ||
118 | data.RegionFlags = 0; // TODO not used? | 139 | data.RegionFlags = 0; // TODO not used? |
119 | data.WaterHeight = 0; // not used | 140 | data.WaterHeight = 0; // not used |
120 | data.X = (ushort)(info.RegionLocX / Constants.RegionSize); | 141 | data.X = (ushort)(info.RegionLocX / Constants.RegionSize); |