aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorArthur Valadares2009-06-01 20:51:40 +0000
committerArthur Valadares2009-06-01 20:51:40 +0000
commit63a499c56938de708c6f79da24d1600f8842187f (patch)
tree4155763de034641a897566c72028e9cc9aa98785 /OpenSim
parent* Removed some commented-out code (diff)
downloadopensim-SC-63a499c56938de708c6f79da24d1600f8842187f.zip
opensim-SC-63a499c56938de708c6f79da24d1600f8842187f.tar.gz
opensim-SC-63a499c56938de708c6f79da24d1600f8842187f.tar.bz2
opensim-SC-63a499c56938de708c6f79da24d1600f8842187f.tar.xz
* Allow for lowercase searching in standalone mode, when case sensitive
search fails. This allows compability to libOMV bots, that always lowercase region names. * Uncertain if this should/could propagate to grids
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Communications/Local/LocalBackEndServices.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
index f52f35b..0ab9374 100644
--- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -379,18 +379,32 @@ namespace OpenSim.Region.Communications.Local
379 379
380 public List<RegionInfo> RequestNamedRegions (string name, int maxNumber) 380 public List<RegionInfo> RequestNamedRegions (string name, int maxNumber)
381 { 381 {
382 List<RegionInfo> lowercase_regions = new List<RegionInfo>();
382 List<RegionInfo> regions = new List<RegionInfo>(); 383 List<RegionInfo> regions = new List<RegionInfo>();
383 foreach (RegionInfo info in m_regions.Values) 384 foreach (RegionInfo info in m_regions.Values)
384 { 385 {
386 // Prioritizes exact match
385 if (info.RegionName.StartsWith(name)) 387 if (info.RegionName.StartsWith(name))
386 { 388 {
387 regions.Add(info); 389 regions.Add(info);
388 if (regions.Count >= maxNumber) break; 390 if (regions.Count >= maxNumber) break;
389 } 391 }
392 // But still saves lower case matches
393 else if (info.RegionName.ToLower().StartsWith(name))
394 {
395 if (lowercase_regions.Count < maxNumber)
396 {
397 lowercase_regions.Add(info);
398 }
399 }
390 } 400 }
391 401
402 // If no exact matches found, return lowercase matches (libOMV compatiblity)
403 if (regions.Count == 0 && lowercase_regions.Count != 0)
404 {
405 return lowercase_regions;
406 }
392 return regions; 407 return regions;
393 } 408 }
394
395 } 409 }
396} 410}