From 905fb969f515aed7349fc5494c03fdc8e9bca620 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 12 Oct 2008 18:54:43 +0000 Subject: Add a configuration section for groups modules --- .../Modules/Avatar/Groups/GroupsModule.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs index 053eeef..5495f5a 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs @@ -53,6 +53,26 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups public void Initialise(Scene scene, IConfigSource config) { + IConfig groupsConfig = config.Configs["Groups"]; + + if (groupsConfig == null) + { + m_log.Info("[GROUPS] No configuration found. Using defaults"); + } + else + { + if (!groupsConfig.GetBoolean("Enabled", false)) + { + m_log.Info("[GROUPS] Groups disabled in configuration"); + return; + } + + if (groupsConfig.GetString("Module", "Default") != "Default") + return; + } + + m_log.Info("[GROUPS] Activated default groups module"); + lock (m_scene) { m_scene.Add(scene); -- cgit v1.1