aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/Groups/GroupsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Addons/Groups/GroupsModule.cs')
-rw-r--r--OpenSim/Addons/Groups/GroupsModule.cs26
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)