diff options
author | UbitUmarov | 2015-09-02 19:54:53 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-02 19:54:53 +0100 |
commit | a11edceb00b5b86f825bd957bdac9edb91f893dd (patch) | |
tree | c192eae26f3aadf365a66f32fc6d9ade2f0a0c61 /OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |
parent | bad merge? (diff) | |
download | opensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.zip opensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.gz opensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.bz2 opensim-SC_OLD-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.xz |
seems to compile ( tests comented out)
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 553d057..e08bdc0 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -141,12 +141,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
141 | 141 | ||
142 | private void OnMapNameRequest(IClientAPI remoteClient, string mapName, uint flags) | 142 | private void OnMapNameRequest(IClientAPI remoteClient, string mapName, uint flags) |
143 | { | 143 | { |
144 | <<<<<<< HEAD | ||
145 | List<MapBlockData> blocks = new List<MapBlockData>(); | ||
146 | if (mapName.Length < 3 || (mapName.EndsWith("#") && mapName.Length < 4)) | ||
147 | ======= | ||
148 | Util.FireAndForget(x => | 144 | Util.FireAndForget(x => |
149 | >>>>>>> avn/ubitvar | ||
150 | { | 145 | { |
151 | List<MapBlockData> blocks = new List<MapBlockData>(); | 146 | List<MapBlockData> blocks = new List<MapBlockData>(); |
152 | if (mapName.Length < 3 || (mapName.EndsWith("#") && mapName.Length < 4)) | 147 | if (mapName.Length < 3 || (mapName.EndsWith("#") && mapName.Length < 4)) |
@@ -232,74 +227,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
232 | // they have different values depending on different viewers, apparently | 227 | // they have different values depending on different viewers, apparently |
233 | remoteClient.SendMapBlock(blocks, flags); | 228 | remoteClient.SendMapBlock(blocks, flags); |
234 | 229 | ||
235 | <<<<<<< HEAD | ||
236 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); | ||
237 | |||
238 | string mapNameOrig = mapName; | ||
239 | if (regionInfos.Count == 0) | ||
240 | { | ||
241 | // Hack to get around the fact that ll V3 now drops the port from the | ||
242 | // map name. See https://jira.secondlife.com/browse/VWR-28570 | ||
243 | // | ||
244 | // Caller, use this magic form instead: | ||
245 | // secondlife://http|!!mygrid.com|8002|Region+Name/128/128 | ||
246 | // or url encode if possible. | ||
247 | // the hacks we do with this viewer... | ||
248 | // | ||
249 | if (mapName.Contains("|")) | ||
250 | mapName = mapName.Replace('|', ':'); | ||
251 | if (mapName.Contains("+")) | ||
252 | mapName = mapName.Replace('+', ' '); | ||
253 | if (mapName.Contains("!")) | ||
254 | mapName = mapName.Replace('!', '/'); | ||
255 | |||
256 | if (mapName != mapNameOrig) | ||
257 | regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); | ||
258 | } | ||
259 | |||
260 | m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); | ||
261 | |||
262 | if (regionInfos.Count > 0) | ||
263 | { | ||
264 | foreach (GridRegion info in regionInfos) | ||
265 | { | ||
266 | if ((flags & 2) == 2) // V2 sends this | ||
267 | { | ||
268 | List<MapBlockData> datas = WorldMap.Map2BlockFromGridRegion(info, flags); | ||
269 | // ugh! V2-3 is very sensitive about the result being | ||
270 | // exactly the same as the requested name | ||
271 | if (regionInfos.Count == 1 && (mapName != mapNameOrig)) | ||
272 | datas.ForEach(d => d.Name = mapNameOrig); | ||
273 | |||
274 | blocks.AddRange(datas); | ||
275 | } | ||
276 | else | ||
277 | { | ||
278 | MapBlockData data = WorldMap.MapBlockFromGridRegion(info, flags); | ||
279 | blocks.Add(data); | ||
280 | } | ||
281 | } | ||
282 | } | ||
283 | |||
284 | // final block, closing the search result | ||
285 | AddFinalBlock(blocks); | ||
286 | |||
287 | // flags are agent flags sent from the viewer. | ||
288 | // they have different values depending on different viewers, apparently | ||
289 | remoteClient.SendMapBlock(blocks, flags); | ||
290 | |||
291 | // send extra user messages for V3 | ||
292 | // because the UI is very confusing | ||
293 | // while we don't fix the hard-coded urls | ||
294 | if (flags == 2) | ||
295 | { | ||
296 | if (regionInfos.Count == 0) | ||
297 | remoteClient.SendAlertMessage("No regions found with that name."); | ||
298 | // this seems unnecessary because found regions will show up in the search results | ||
299 | //else if (regionInfos.Count == 1) | ||
300 | // remoteClient.SendAlertMessage("Region found!"); | ||
301 | } | ||
302 | ======= | ||
303 | // send extra user messages for V3 | 230 | // send extra user messages for V3 |
304 | // because the UI is very confusing | 231 | // because the UI is very confusing |
305 | // while we don't fix the hard-coded urls | 232 | // while we don't fix the hard-coded urls |
@@ -311,7 +238,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
311 | // remoteClient.SendAgentAlertMessage("Region found!", false); | 238 | // remoteClient.SendAgentAlertMessage("Region found!", false); |
312 | } | 239 | } |
313 | }); | 240 | }); |
314 | >>>>>>> avn/ubitvar | ||
315 | } | 241 | } |
316 | 242 | ||
317 | private void AddFinalBlock(List<MapBlockData> blocks) | 243 | private void AddFinalBlock(List<MapBlockData> blocks) |