diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs (renamed from OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs) | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs index 4095041..0bfb8e7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsMessaging.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs | |||
@@ -31,6 +31,7 @@ using System.Reflection; | |||
31 | 31 | ||
32 | 32 | ||
33 | using log4net; | 33 | using log4net; |
34 | using Mono.Addins; | ||
34 | using Nini.Config; | 35 | using Nini.Config; |
35 | 36 | ||
36 | using OpenMetaverse; | 37 | using OpenMetaverse; |
@@ -46,7 +47,8 @@ using Caps = OpenSim.Framework.Capabilities.Caps; | |||
46 | 47 | ||
47 | namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | 48 | namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups |
48 | { | 49 | { |
49 | public class XmlRpcGroupsMessaging : ISharedRegionModule | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
51 | public class GroupsMessagingModule : ISharedRegionModule | ||
50 | { | 52 | { |
51 | 53 | ||
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -57,7 +59,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
57 | 59 | ||
58 | private IGroupsModule m_groupsModule = null; | 60 | private IGroupsModule m_groupsModule = null; |
59 | 61 | ||
60 | // TODO: Move this off to the xmlrpc server | 62 | // TODO: Move this off to the Groups Server |
61 | public Dictionary<Guid, List<Guid>> m_agentsInGroupSession = new Dictionary<Guid, List<Guid>>(); | 63 | public Dictionary<Guid, List<Guid>> m_agentsInGroupSession = new Dictionary<Guid, List<Guid>>(); |
62 | public Dictionary<Guid, List<Guid>> m_agentsDroppedSession = new Dictionary<Guid, List<Guid>>(); | 64 | public Dictionary<Guid, List<Guid>> m_agentsDroppedSession = new Dictionary<Guid, List<Guid>>(); |
63 | 65 | ||
@@ -79,31 +81,28 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
79 | } | 81 | } |
80 | else | 82 | else |
81 | { | 83 | { |
82 | if (!groupsConfig.GetBoolean("Enabled", false)) | 84 | // if groups aren't enabled, we're not needed. |
83 | { | 85 | // if we're not specified as the connector to use, then we're not wanted |
84 | return; | 86 | if ((groupsConfig.GetBoolean("Enabled", false) == false) |
85 | } | 87 | || (groupsConfig.GetString("MessagingModule", "Default") != Name)) |
86 | |||
87 | if (groupsConfig.GetString("Module", "Default") != "XmlRpcGroups") | ||
88 | { | 88 | { |
89 | m_groupMessagingEnabled = false; | 89 | m_groupMessagingEnabled = false; |
90 | |||
91 | return; | 90 | return; |
92 | } | 91 | } |
93 | 92 | ||
94 | m_groupMessagingEnabled = groupsConfig.GetBoolean("XmlRpcMessagingEnabled", true); | 93 | m_groupMessagingEnabled = groupsConfig.GetBoolean("MessagingEnabled", true); |
95 | 94 | ||
96 | if (!m_groupMessagingEnabled) | 95 | if (!m_groupMessagingEnabled) |
97 | { | 96 | { |
98 | return; | 97 | return; |
99 | } | 98 | } |
100 | 99 | ||
101 | m_log.Info("[GROUPS-MESSAGING]: Initializing XmlRpcGroupsMessaging"); | 100 | m_log.Info("[GROUPS-MESSAGING]: Initializing GroupsMessagingModule"); |
102 | 101 | ||
103 | m_debugEnabled = groupsConfig.GetBoolean("XmlRpcDebugEnabled", true); | 102 | m_debugEnabled = groupsConfig.GetBoolean("DebugEnabled", true); |
104 | } | 103 | } |
105 | 104 | ||
106 | m_log.Info("[GROUPS-MESSAGING]: XmlRpcGroupsMessaging starting up"); | 105 | m_log.Info("[GROUPS-MESSAGING]: GroupsMessagingModule starting up"); |
107 | 106 | ||
108 | } | 107 | } |
109 | 108 | ||
@@ -123,7 +122,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
123 | // No groups module, no groups messaging | 122 | // No groups module, no groups messaging |
124 | if (m_groupsModule == null) | 123 | if (m_groupsModule == null) |
125 | { | 124 | { |
126 | m_log.Error("[GROUPS-MESSAGING]: Could not get IGroupsModule, XmlRpcGroupsMessaging is now disabled."); | 125 | m_log.Error("[GROUPS-MESSAGING]: Could not get IGroupsModule, GroupsMessagingModule is now disabled."); |
127 | Close(); | 126 | Close(); |
128 | m_groupMessagingEnabled = false; | 127 | m_groupMessagingEnabled = false; |
129 | return; | 128 | return; |
@@ -163,7 +162,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
163 | if (!m_groupMessagingEnabled) | 162 | if (!m_groupMessagingEnabled) |
164 | return; | 163 | return; |
165 | 164 | ||
166 | if (m_debugEnabled) m_log.Debug("[GROUPS-MESSAGING]: Shutting down XmlRpcGroupsMessaging module."); | 165 | if (m_debugEnabled) m_log.Debug("[GROUPS-MESSAGING]: Shutting down GroupsMessagingModule module."); |
167 | 166 | ||
168 | foreach (Scene scene in m_sceneList) | 167 | foreach (Scene scene in m_sceneList) |
169 | { | 168 | { |
@@ -184,7 +183,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
184 | 183 | ||
185 | public string Name | 184 | public string Name |
186 | { | 185 | { |
187 | get { return "XmlRpcGroupsMessaging"; } | 186 | get { return "GroupsMessagingModule"; } |
188 | } | 187 | } |
189 | 188 | ||
190 | #endregion | 189 | #endregion |