aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
diff options
context:
space:
mode:
authorMichael Cortez2009-08-05 11:15:53 -0700
committerMichael Cortez2009-08-05 11:15:53 -0700
commit989517725d02d8a2d216e599856eb2625b454e25 (patch)
tree74f31eac6e685361ff5d469cdc6992158964666f /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
parentforce back the Regions directory, which because it was empty in svn never made (diff)
downloadopensim-SC-989517725d02d8a2d216e599856eb2625b454e25.zip
opensim-SC-989517725d02d8a2d216e599856eb2625b454e25.tar.gz
opensim-SC-989517725d02d8a2d216e599856eb2625b454e25.tar.bz2
opensim-SC-989517725d02d8a2d216e599856eb2625b454e25.tar.xz
Begin refactoring XmlRpcGroups to a more generic Groups module that allows for replaceable Groups Service Connectors.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs (renamed from OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs)28
1 files changed, 16 insertions, 12 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 2cbc571..f0e386b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -49,7 +49,7 @@ using DirFindFlags = OpenMetaverse.DirectoryManager.DirFindFlags;
49 49
50namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups 50namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
51{ 51{
52 public class XmlRpcGroupsModule : ISharedRegionModule, IGroupsModule 52 public class GroupsModule : ISharedRegionModule, IGroupsModule
53 { 53 {
54 /// <summary> 54 /// <summary>
55 /// ; To use this module, you must specify the following in your OpenSim.ini 55 /// ; To use this module, you must specify the following in your OpenSim.ini
@@ -78,7 +78,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
78 78
79 private IMessageTransferModule m_msgTransferModule = null; 79 private IMessageTransferModule m_msgTransferModule = null;
80 80
81 private IGroupDataProvider m_groupData = null; 81 private IGroupsServicesConnector m_groupData = null;
82 82
83 class GroupRequestIDInfo 83 class GroupRequestIDInfo
84 { 84 {
@@ -91,7 +91,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
91 91
92 92
93 // Configuration settings 93 // Configuration settings
94 private const string m_defaultXmlRpcServiceURL = "http://osflotsam.org/xmlrpc.php";
95 private bool m_groupsEnabled = false; 94 private bool m_groupsEnabled = false;
96 private bool m_groupNoticesEnabled = true; 95 private bool m_groupNoticesEnabled = true;
97 private bool m_debugEnabled = true; 96 private bool m_debugEnabled = true;
@@ -124,15 +123,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
124 123
125 m_log.InfoFormat("[GROUPS]: Initializing {0}", this.Name); 124 m_log.InfoFormat("[GROUPS]: Initializing {0}", this.Name);
126 125
127 string ServiceURL = groupsConfig.GetString("XmlRpcServiceURL", m_defaultXmlRpcServiceURL);
128 bool DisableKeepAlive = groupsConfig.GetBoolean("XmlRpcDisableKeepAlive", false);
129
130 string ServiceReadKey = groupsConfig.GetString("XmlRpcServiceReadKey", string.Empty);
131 string ServiceWriteKey = groupsConfig.GetString("XmlRpcServiceWriteKey", string.Empty);
132
133 m_groupData = new XmlRpcGroupDataProvider(ServiceURL, DisableKeepAlive, ServiceReadKey, ServiceWriteKey);
134 m_log.InfoFormat("[GROUPS]: XmlRpc Service URL set to: {0}", ServiceURL);
135
136 m_groupNoticesEnabled = groupsConfig.GetBoolean("XmlRpcNoticesEnabled", true); 126 m_groupNoticesEnabled = groupsConfig.GetBoolean("XmlRpcNoticesEnabled", true);
137 m_debugEnabled = groupsConfig.GetBoolean("XmlRpcDebugEnabled", true); 127 m_debugEnabled = groupsConfig.GetBoolean("XmlRpcDebugEnabled", true);
138 128
@@ -172,6 +162,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
172 162
173 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 163 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
174 164
165 if (m_groupData == null)
166 {
167 m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
168
169 // No Groups Service Connector, then nothing works...
170 if (m_groupData == null)
171 {
172 m_groupsEnabled = false;
173 m_log.Error("[GROUPS]: Could not get IGroupsServicesConnector");
174 Close();
175 return;
176 }
177 }
178
175 if (m_msgTransferModule == null) 179 if (m_msgTransferModule == null)
176 { 180 {
177 m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>(); 181 m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();