Make region flag specs work for regions whose names contain spaces. Uses underscore in place of spaces. Region_Word1_Word2.

slimupdates
Diva Canto 2010-01-13 15:42:43 -08:00
parent c5aeb4ba77
commit ab021aaa25
1 changed files with 3 additions and 2 deletions

View File

@ -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();
}