From 07559707c59a78a2627fdf301dded39010287737 Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Tue, 6 Jul 2010 17:36:47 -0400 Subject: Fixes problem where "Adult" regions were reported as being of type "Unknown". --- OpenSim/Region/DataSnapshot/SnapshotStore.cs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/DataSnapshot/SnapshotStore.cs') diff --git a/OpenSim/Region/DataSnapshot/SnapshotStore.cs b/OpenSim/Region/DataSnapshot/SnapshotStore.cs index 976c2c1..f356b43 100644 --- a/OpenSim/Region/DataSnapshot/SnapshotStore.cs +++ b/OpenSim/Region/DataSnapshot/SnapshotStore.cs @@ -258,21 +258,16 @@ namespace OpenSim.Region.DataSnapshot private String GetRegionCategory(Scene scene) { - //Boolean choice between: - // "PG" - Mormontown - // "Mature" - Sodom and Gomorrah if (scene.RegionInfo.RegionSettings.Maturity == 1) - { return "Mature"; - } - else if (scene.RegionInfo.RegionSettings.Maturity == 0) - { + + if (scene.RegionInfo.RegionSettings.Maturity == 2) + return "Adult"; + + if (scene.RegionInfo.RegionSettings.Maturity == 0) return "PG"; - } - else - { - return "Unknown"; - } + + return "Unknown"; } private XmlNode GetGridSnapshotData(XmlDocument factory) -- cgit v1.1 From 32cfdb0f6a3d48ce36c322dd0ccc942586f710be Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 7 Jul 2010 02:40:51 -0700 Subject: Switched order of conditionals. --- OpenSim/Region/DataSnapshot/SnapshotStore.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/DataSnapshot/SnapshotStore.cs') diff --git a/OpenSim/Region/DataSnapshot/SnapshotStore.cs b/OpenSim/Region/DataSnapshot/SnapshotStore.cs index f356b43..70cb205 100644 --- a/OpenSim/Region/DataSnapshot/SnapshotStore.cs +++ b/OpenSim/Region/DataSnapshot/SnapshotStore.cs @@ -258,15 +258,15 @@ namespace OpenSim.Region.DataSnapshot private String GetRegionCategory(Scene scene) { + if (scene.RegionInfo.RegionSettings.Maturity == 0) + return "PG"; + if (scene.RegionInfo.RegionSettings.Maturity == 1) return "Mature"; if (scene.RegionInfo.RegionSettings.Maturity == 2) return "Adult"; - if (scene.RegionInfo.RegionSettings.Maturity == 0) - return "PG"; - return "Unknown"; } -- cgit v1.1