Change chat config code so that enabled = false actually does disable the chat module

This commit is contained in:
Justin Clark-Casey (justincc)
2009-11-25 16:23:37 +00:00
parent a4d2a97bc6
commit 40464f6cc6

View File

@@ -62,15 +62,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
if (null == m_config)
{
m_log.Info("[CHAT]: no config found, plugin disabled");
m_enabled = false;
return;
}
if (!m_config.GetBoolean("enabled", false))
if (!m_config.GetBoolean("enabled", true))
{
m_log.Info("[CHAT]: plugin disabled by configuration");
m_enabled = false;
return;
}
m_enabled = true;
m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance);
m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance);