Add a configuration section for groups modules

0.6.0-stable
Melanie Thielker 2008-10-12 18:54:43 +00:00
parent b8a50c40b1
commit 905fb969f5
1 changed files with 20 additions and 0 deletions

View File

@ -53,6 +53,26 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
public void Initialise(Scene scene, IConfigSource config) 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) lock (m_scene)
{ {
m_scene.Add(scene); m_scene.Add(scene);