diff options
author | UbitUmarov | 2014-08-12 18:28:01 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-12 18:28:01 +0100 |
commit | a0f26dc6ec2323ffa09070e80564d3dd691408cb (patch) | |
tree | 7bb232f2f61f2e407af4f51a259e23da9167dd2b /OpenSim/Region/OptionalModules | |
parent | remove a land.SendLandUpdateToClient() since its now done for all cases in (diff) | |
download | opensim-SC_OLD-a0f26dc6ec2323ffa09070e80564d3dd691408cb.zip opensim-SC_OLD-a0f26dc6ec2323ffa09070e80564d3dd691408cb.tar.gz opensim-SC_OLD-a0f26dc6ec2323ffa09070e80564d3dd691408cb.tar.bz2 opensim-SC_OLD-a0f26dc6ec2323ffa09070e80564d3dd691408cb.tar.xz |
change XMLIrpgGroups attach to events, using the more correct
\addons\Groups\... model
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index d2a6828..2764465 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -195,6 +195,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
195 | } | 195 | } |
196 | 196 | ||
197 | scene.EventManager.OnNewClient += OnNewClient; | 197 | scene.EventManager.OnNewClient += OnNewClient; |
198 | scene.EventManager.OnMakeRootAgent += OnMakeRoot; | ||
199 | scene.EventManager.OnMakeChildAgent += OnMakeChild; | ||
198 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; | 200 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; |
199 | // The InstantMessageModule itself doesn't do this, | 201 | // The InstantMessageModule itself doesn't do this, |
200 | // so lets see if things explode if we don't do it | 202 | // so lets see if things explode if we don't do it |
@@ -245,19 +247,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
245 | #endregion | 247 | #endregion |
246 | 248 | ||
247 | #region EventHandlers | 249 | #region EventHandlers |
250 | |||
251 | private void OnMakeRoot(ScenePresence sp) | ||
252 | { | ||
253 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
254 | |||
255 | sp.ControllingClient.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | ||
256 | // Used for Notices and Group Invites/Accept/Reject | ||
257 | sp.ControllingClient.OnInstantMessage += OnInstantMessage; | ||
258 | // Send client their groups information. | ||
259 | // SendAgentGroupDataUpdate(sp.ControllingClient, sp.UUID); | ||
260 | // only send data viwer will ask rest later | ||
261 | OnAgentDataUpdateRequest(sp.ControllingClient, sp.UUID, sp.UUID); | ||
262 | } | ||
263 | |||
264 | private void OnMakeChild(ScenePresence sp) | ||
265 | { | ||
266 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | ||
267 | |||
268 | sp.ControllingClient.OnUUIDGroupNameRequest -= HandleUUIDGroupNameRequest; | ||
269 | sp.ControllingClient.OnInstantMessage -= OnInstantMessage; | ||
270 | } | ||
271 | |||
248 | private void OnNewClient(IClientAPI client) | 272 | private void OnNewClient(IClientAPI client) |
249 | { | 273 | { |
250 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 274 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
251 | 275 | ||
252 | client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | ||
253 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; | 276 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; |
254 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; | 277 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; |
255 | |||
256 | // Used for Notices and Group Invites/Accept/Reject | ||
257 | client.OnInstantMessage += OnInstantMessage; | ||
258 | |||
259 | // Send client their groups information. | ||
260 | SendAgentGroupDataUpdate(client, client.AgentId); | ||
261 | } | 278 | } |
262 | 279 | ||
263 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) | 280 | private void OnRequestAvatarProperties(IClientAPI remoteClient, UUID avatarID) |