diff options
author | Diva Canto | 2013-07-27 15:38:56 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-27 15:38:56 -0700 |
commit | 69975763d2a735eb2696d2e27e5796a472a208ea (patch) | |
tree | 3d3454d731471148951de01a9931aa5e67d359da /OpenSim/Addons/Groups/GroupsModule.cs | |
parent | Clarifications on documentation of Group configs (diff) | |
download | opensim-SC-69975763d2a735eb2696d2e27e5796a472a208ea.zip opensim-SC-69975763d2a735eb2696d2e27e5796a472a208ea.tar.gz opensim-SC-69975763d2a735eb2696d2e27e5796a472a208ea.tar.bz2 opensim-SC-69975763d2a735eb2696d2e27e5796a472a208ea.tar.xz |
Several major improvements to group (V2) chat. Specifically: handle join/drop appropriately, invitechatboxes.
The major departure from flotsam is to send only one message per destination region, as opposed to one message per group member. This reduces messaging considerably in large groups that have clusters of members in certain regions.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Addons/Groups/GroupsModule.cs | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 69d03a9..a14dc6a 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -141,6 +141,8 @@ namespace OpenSim.Groups | |||
141 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 141 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
142 | 142 | ||
143 | scene.EventManager.OnNewClient += OnNewClient; | 143 | scene.EventManager.OnNewClient += OnNewClient; |
144 | scene.EventManager.OnMakeRootAgent += OnMakeRoot; | ||
145 | scene.EventManager.OnMakeChildAgent += OnMakeChild; | ||
144 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; | 146 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; |
145 | // The InstantMessageModule itself doesn't do this, | 147 | // The InstantMessageModule itself doesn't do this, |
146 | // so lets see if things explode if we don't do it | 148 | // so lets see if things explode if we don't do it |
@@ -194,6 +196,7 @@ namespace OpenSim.Groups | |||
194 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 196 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
195 | 197 | ||
196 | scene.EventManager.OnNewClient -= OnNewClient; | 198 | scene.EventManager.OnNewClient -= OnNewClient; |
199 | scene.EventManager.OnMakeRootAgent -= OnMakeRoot; | ||
197 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; | 200 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; |
198 | 201 | ||
199 | lock (m_sceneList) | 202 | lock (m_sceneList) |
@@ -232,16 +235,31 @@ namespace OpenSim.Groups | |||
232 | { | 235 | { |
233 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 236 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
234 | 237 | ||
235 | client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | ||
236 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; | 238 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; |
237 | client.OnDirFindQuery += OnDirFindQuery; | ||
238 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; | 239 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; |
240 | } | ||
239 | 241 | ||
242 | private void OnMakeRoot(ScenePresence sp) | ||
243 | { | ||
244 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
245 | |||
246 | sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | ||
247 | sp.ControllingClient.OnDirFindQuery += OnDirFindQuery; | ||
240 | // Used for Notices and Group Invites/Accept/Reject | 248 | // Used for Notices and Group Invites/Accept/Reject |
241 | client.OnInstantMessage += OnInstantMessage; | 249 | sp.ControllingClient.OnInstantMessage += OnInstantMessage; |
242 | 250 | ||
243 | // Send client their groups information. | 251 | // Send client their groups information. |
244 | SendAgentGroupDataUpdate(client, client.AgentId); | 252 | SendAgentGroupDataUpdate(sp.ControllingClient, sp.UUID); |
253 | } | ||
254 | |||
255 | private void OnMakeChild(ScenePresence sp) | ||
256 | { | ||
257 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
258 | |||
259 | sp.ControllingClient.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest; | ||
260 | sp.ControllingClient.OnDirFindQuery -= OnDirFindQuery; | ||
261 | // Used for Notices and Group Invites/Accept/Reject | ||
262 | sp.ControllingClient.OnInstantMessage -= OnInstantMessage; | ||
245 | } | 263 | } |
246 | 264 | ||
247 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) | 265 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) |