From ab021aaa25d4ec4874ddc06eee77af9944d75926 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 13 Jan 2010 15:42:43 -0800 Subject: [PATCH] Make region flag specs work for regions whose names contain spaces. Uses underscore in place of spaces. Region_Word1_Word2. --- OpenSim/Services/GridService/GridService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index c48b10cc8a..4f93ce56b2 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs @@ -127,10 +127,11 @@ namespace OpenSim.Services.GridService else { rdata.Data["flags"] = "0"; - if (gridConfig != null) + if ((gridConfig != null) && rdata.RegionName != string.Empty) { int newFlags = 0; - newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + rdata.RegionName, String.Empty)); + string regionName = rdata.RegionName.Trim().Replace(' ', '_'); + newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + regionName, String.Empty)); newFlags = ParseFlags(newFlags, gridConfig.GetString("Region_" + rdata.RegionID.ToString(), String.Empty)); rdata.Data["flags"] = newFlags.ToString(); }