From 489758f68abe15e55f73d660225e7af1851b0882 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 20 Apr 2009 13:39:41 +0000 Subject: [PATCH] Make sure that the groups module is really disabled when it's not configured. Fixes an issue where the presence of any groups section will make XmlRpcGroups think it should hook client events. --- .../Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs index 7ae3b90c37..6a3aa064c8 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs @@ -107,6 +107,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (groupsConfig.GetString("Module", "Default") != "XmlRpcGroups") { m_log.Info("[GROUPS]: Config Groups Module not set to XmlRpcGroups"); + m_GroupsEnabled = false; return; } @@ -129,11 +130,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public void RegionLoaded(Scene scene) { - if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); - if (!m_GroupsEnabled) return; + if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); m_MsgTransferModule = scene.RequestModuleInterface(); @@ -157,6 +157,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public void RemoveRegion(Scene scene) { + if (!m_GroupsEnabled) + return; + if (m_debugEnabled) m_log.InfoFormat("[GROUPS] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); m_SceneList.Remove(scene); @@ -164,6 +167,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public void Close() { + if (!m_GroupsEnabled) + return; m_log.Debug("[GROUPS]: Shutting down XmlRpcGroups module."); }