From 16d68749a457acf079a6737f4ca9a9adb9e53e2f Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Fri, 3 Oct 2008 23:00:42 +0000 Subject: Add the missing bits for the new region-search: - Added lookup in the data-layer - MySQL works - SQLite doesn't have a grid-db, so it won't work there - I added MSSQL-code to the best of my knowledge; but I don't know MSSQL :-) - Added the plumbing up to OGS1GridServices. This speaks with the grid-server via XMLRPC. - Modified MapSearchModule to use the new data. It's backward compatible; if used with an old grid-server, it just returns one found region instead of a list. - Refactored a bit. Note: This updates data, grid-server and region code. No new files. --- .../Region/Communications/Local/LocalBackEndServices.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Region/Communications/Local/LocalBackEndServices.cs') diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index a861ceb..9034e49 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -514,5 +514,20 @@ namespace OpenSim.Region.Communications.Local m_log.Debug("[INTERREGION STANDALONE] didn't find land data locally."); return null; } + + public List RequestNamedRegions (string name, int maxNumber) + { + List regions = new List(); + foreach (RegionInfo info in m_regions.Values) + { + if (info.RegionName.StartsWith(name)) + { + regions.Add(info); + if (regions.Count >= maxNumber) break; + } + } + + return regions; + } } } -- cgit v1.1