diff options
author | Teravus Ovares | 2008-03-18 05:44:25 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-03-18 05:44:25 +0000 |
commit | 42857fe4e9e898c8e350da2f9acb3b252b31694a (patch) | |
tree | de55ab7f5d6d6e1bb127a39f6e97f67e4e442cf4 /OpenSim/Grid/GridServer/GridManager.cs | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC-42857fe4e9e898c8e350da2f9acb3b252b31694a.zip opensim-SC-42857fe4e9e898c8e350da2f9acb3b252b31694a.tar.gz opensim-SC-42857fe4e9e898c8e350da2f9acb3b252b31694a.tar.bz2 opensim-SC-42857fe4e9e898c8e350da2f9acb3b252b31694a.tar.xz |
* Added the ability to type the partial name of a region in the start location box and go to that region if it's there. If no close match was found, it sends you home. This is tested on mySQL. There's untested code on grids that are based on sqlite and MSSQL. The SQL statements *should* be right, but your results may very.
* Ex, if you want to go to Wright Plaza, you simply need to type Wright Plaza in the start location in the client when you log-in.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index e9ff91a..86fc445 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -164,6 +164,27 @@ namespace OpenSim.Grid.GridServer | |||
164 | return null; | 164 | return null; |
165 | } | 165 | } |
166 | 166 | ||
167 | /// <summary> | ||
168 | /// Returns a region by argument | ||
169 | /// </summary> | ||
170 | /// <param name="regionName">A partial regionName of the region to return</param> | ||
171 | /// <returns>A SimProfileData for the region</returns> | ||
172 | public RegionProfileData getRegion(string regionName) | ||
173 | { | ||
174 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | ||
175 | { | ||
176 | try | ||
177 | { | ||
178 | return kvp.Value.GetProfileByString(regionName); | ||
179 | } | ||
180 | catch | ||
181 | { | ||
182 | m_log.Warn("[storage]: Unable to find region " + regionName + " via " + kvp.Key); | ||
183 | } | ||
184 | } | ||
185 | return null; | ||
186 | } | ||
187 | |||
167 | public Dictionary<ulong, RegionProfileData> getRegions(uint xmin, uint ymin, uint xmax, uint ymax) | 188 | public Dictionary<ulong, RegionProfileData> getRegions(uint xmin, uint ymin, uint xmax, uint ymax) |
168 | { | 189 | { |
169 | Dictionary<ulong, RegionProfileData> regions = new Dictionary<ulong, RegionProfileData>(); | 190 | Dictionary<ulong, RegionProfileData> regions = new Dictionary<ulong, RegionProfileData>(); |
@@ -615,6 +636,10 @@ namespace OpenSim.Grid.GridServer | |||
615 | //CFK: Console.WriteLine("requesting data for region " + (string) requestData["region_handle"]); | 636 | //CFK: Console.WriteLine("requesting data for region " + (string) requestData["region_handle"]); |
616 | simData = getRegion(Convert.ToUInt64((string)requestData["region_handle"])); | 637 | simData = getRegion(Convert.ToUInt64((string)requestData["region_handle"])); |
617 | } | 638 | } |
639 | else if (requestData.ContainsKey("region_name_search")) | ||
640 | { | ||
641 | simData = getRegion((string)requestData["region_name_search"]); | ||
642 | } | ||
618 | 643 | ||
619 | if (simData == null) | 644 | if (simData == null) |
620 | { | 645 | { |