aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2012-03-15 16:03:09 -0700
committerDiva Canto2012-03-15 16:03:09 -0700
commit18d1d6d3b4658b2b00c738d54ff4230868c02c6c (patch)
tree83936b8dd8f9e907829b40f134acb7a9f329040e
parentRevert "Revert "More hacking around viewer bug"" (diff)
downloadopensim-SC-18d1d6d3b4658b2b00c738d54ff4230868c02c6c.zip
opensim-SC-18d1d6d3b4658b2b00c738d54ff4230868c02c6c.tar.gz
opensim-SC-18d1d6d3b4658b2b00c738d54ff4230868c02c6c.tar.bz2
opensim-SC-18d1d6d3b4658b2b00c738d54ff4230868c02c6c.tar.xz
More on SLURLs and V3. This is hacky, but it works. Basically, we have to redefine the encoding of HG URLs because the viewer messes them up. Examples of what works and doesn't work:
- secondlife://ucigrid00.nacs.uci.edu|8002/128/128 <-- works throughout the viewer - secondlife://http|!!ucigrid00.nacs.uci.edu|8002+Test+Zone+1/128/128 <-- works throughout the viewer - secondlife://http|!!grid.sciencesim.com!grid!hypergrid.php+Yellowstone01+74/128/128 <-- works throughout - secondlife://http%3A%2F%2Fucigrid00.nacs.uci.edu%3A8002%20UCI%20Central%201/128/128 <-- works in chat, but not as URLs in the webkit
Diffstat (limited to '')
-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);