diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 8baeaa4..9969a15 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -218,6 +218,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
218 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 218 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
219 | 219 | ||
220 | client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; | 220 | client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest; |
221 | client.OnObjectGroupRequest += HandleObjectGroupUpdate; | ||
221 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; | 222 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; |
222 | client.OnDirFindQuery += OnDirFindQuery; | 223 | client.OnDirFindQuery += OnDirFindQuery; |
223 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; | 224 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; |
@@ -225,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
225 | // Used for Notices and Group Invites/Accept/Reject | 226 | // Used for Notices and Group Invites/Accept/Reject |
226 | client.OnInstantMessage += OnInstantMessage; | 227 | client.OnInstantMessage += OnInstantMessage; |
227 | 228 | ||
228 | // Send client thier groups information. | 229 | // Send client their groups information. |
229 | SendAgentGroupDataUpdate(client, client.AgentId); | 230 | SendAgentGroupDataUpdate(client, client.AgentId); |
230 | } | 231 | } |
231 | 232 | ||
@@ -328,6 +329,30 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
328 | remoteClient.SendGroupNameReply(GroupID, GroupName); | 329 | remoteClient.SendGroupNameReply(GroupID, GroupName); |
329 | } | 330 | } |
330 | 331 | ||
332 | private void HandleObjectGroupUpdate( | ||
333 | IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage) | ||
334 | { | ||
335 | GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId); | ||
336 | |||
337 | if (gmd == null) | ||
338 | { | ||
339 | // m_log.WarnFormat( | ||
340 | // "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", | ||
341 | // remoteClient.Name, GroupID, objectLocalID); | ||
342 | |||
343 | return; | ||
344 | } | ||
345 | |||
346 | SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID); | ||
347 | if (so != null) | ||
348 | { | ||
349 | if (so.OwnerID == remoteClient.AgentId) | ||
350 | { | ||
351 | so.SetGroup(GroupID, remoteClient); | ||
352 | } | ||
353 | } | ||
354 | } | ||
355 | |||
331 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) | 356 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) |
332 | { | 357 | { |
333 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 358 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |