diff options
author | Melanie | 2011-12-19 23:16:20 +0000 |
---|---|---|
committer | Melanie | 2011-12-19 23:16:20 +0000 |
commit | 2b4ebe657ce1f453d573d017658cb179b6d16c9a (patch) | |
tree | 8f5056eae2d3c8c906ca66bc82a08ed14ef2ac5f | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Move HandleObjectGroupUpdate() from GroupsModule to Scene.PacketHandlers.cs a... (diff) | |
download | opensim-SC_OLD-2b4ebe657ce1f453d573d017658cb179b6d16c9a.zip opensim-SC_OLD-2b4ebe657ce1f453d573d017658cb179b6d16c9a.tar.gz opensim-SC_OLD-2b4ebe657ce1f453d573d017658cb179b6d16c9a.tar.bz2 opensim-SC_OLD-2b4ebe657ce1f453d573d017658cb179b6d16c9a.tar.xz |
Merge branch 'master' into careminster
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 39 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 30 |
3 files changed, 44 insertions, 36 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index fd179ba..bf2e775 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -154,6 +154,45 @@ namespace OpenSim.Region.Framework.Scenes | |||
154 | } | 154 | } |
155 | 155 | ||
156 | /// <summary> | 156 | /// <summary> |
157 | /// Handle the update of an object's user group. | ||
158 | /// </summary> | ||
159 | /// <param name="remoteClient"></param> | ||
160 | /// <param name="groupID"></param> | ||
161 | /// <param name="objectLocalID"></param> | ||
162 | /// <param name="Garbage"></param> | ||
163 | private void HandleObjectGroupUpdate( | ||
164 | IClientAPI remoteClient, UUID groupID, uint objectLocalID, UUID Garbage) | ||
165 | { | ||
166 | if (m_groupsModule == null) | ||
167 | return; | ||
168 | |||
169 | // XXX: Might be better to get rid of this special casing and have GetMembershipData return something | ||
170 | // reasonable for a UUID.Zero group. | ||
171 | if (groupID != UUID.Zero) | ||
172 | { | ||
173 | GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId); | ||
174 | |||
175 | if (gmd == null) | ||
176 | { | ||
177 | // m_log.WarnFormat( | ||
178 | // "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", | ||
179 | // remoteClient.Name, GroupID, objectLocalID); | ||
180 | |||
181 | return; | ||
182 | } | ||
183 | } | ||
184 | |||
185 | SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID); | ||
186 | if (so != null) | ||
187 | { | ||
188 | if (so.OwnerID == remoteClient.AgentId) | ||
189 | { | ||
190 | so.SetGroup(groupID, remoteClient); | ||
191 | } | ||
192 | } | ||
193 | } | ||
194 | |||
195 | /// <summary> | ||
157 | /// Handle the deselection of a prim from the client. | 196 | /// Handle the deselection of a prim from the client. |
158 | /// </summary> | 197 | /// </summary> |
159 | /// <param name="primLocalID"></param> | 198 | /// <param name="primLocalID"></param> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f8487e7..c2ba893 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -142,6 +142,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
142 | protected IDialogModule m_dialogModule; | 142 | protected IDialogModule m_dialogModule; |
143 | protected IEntityTransferModule m_teleportModule; | 143 | protected IEntityTransferModule m_teleportModule; |
144 | protected ICapabilitiesModule m_capsModule; | 144 | protected ICapabilitiesModule m_capsModule; |
145 | protected IGroupsModule m_groupsModule; | ||
145 | 146 | ||
146 | /// <summary> | 147 | /// <summary> |
147 | /// Current scene frame number | 148 | /// Current scene frame number |
@@ -1206,6 +1207,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1206 | m_dialogModule = RequestModuleInterface<IDialogModule>(); | 1207 | m_dialogModule = RequestModuleInterface<IDialogModule>(); |
1207 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); | 1208 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); |
1208 | m_teleportModule = RequestModuleInterface<IEntityTransferModule>(); | 1209 | m_teleportModule = RequestModuleInterface<IEntityTransferModule>(); |
1210 | m_groupsModule = RequestModuleInterface<IGroupsModule>(); | ||
1209 | } | 1211 | } |
1210 | 1212 | ||
1211 | #endregion | 1213 | #endregion |
@@ -2856,6 +2858,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2856 | client.OnObjectDescription += m_sceneGraph.PrimDescription; | 2858 | client.OnObjectDescription += m_sceneGraph.PrimDescription; |
2857 | client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; | 2859 | client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; |
2858 | client.OnObjectOwner += ObjectOwner; | 2860 | client.OnObjectOwner += ObjectOwner; |
2861 | client.OnObjectGroupRequest += HandleObjectGroupUpdate; | ||
2859 | } | 2862 | } |
2860 | 2863 | ||
2861 | public virtual void SubscribeToClientPrimRezEvents(IClientAPI client) | 2864 | public virtual void SubscribeToClientPrimRezEvents(IClientAPI client) |
@@ -3675,15 +3678,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3675 | m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!"); | 3678 | m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!"); |
3676 | } | 3679 | } |
3677 | 3680 | ||
3678 | IGroupsModule groupsModule = | ||
3679 | RequestModuleInterface<IGroupsModule>(); | ||
3680 | |||
3681 | List<UUID> agentGroups = new List<UUID>(); | 3681 | List<UUID> agentGroups = new List<UUID>(); |
3682 | 3682 | ||
3683 | if (groupsModule != null) | 3683 | if (m_groupsModule != null) |
3684 | { | 3684 | { |
3685 | GroupMembershipData[] GroupMembership = | 3685 | GroupMembershipData[] GroupMembership = m_groupsModule.GetMembershipData(agent.AgentID); |
3686 | groupsModule.GetMembershipData(agent.AgentID); | ||
3687 | 3686 | ||
3688 | if (GroupMembership != null) | 3687 | if (GroupMembership != null) |
3689 | { | 3688 | { |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 8002cb6..4e214d9 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -218,7 +218,6 @@ 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; | ||
222 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; | 221 | client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest; |
223 | client.OnDirFindQuery += OnDirFindQuery; | 222 | client.OnDirFindQuery += OnDirFindQuery; |
224 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; | 223 | client.OnRequestAvatarProperties += OnRequestAvatarProperties; |
@@ -329,35 +328,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
329 | remoteClient.SendGroupNameReply(GroupID, GroupName); | 328 | remoteClient.SendGroupNameReply(GroupID, GroupName); |
330 | } | 329 | } |
331 | 330 | ||
332 | private void HandleObjectGroupUpdate( | ||
333 | IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage) | ||
334 | { | ||
335 | // XXX: Might be better to get rid of this special casing and have GetMembershipData return something | ||
336 | // reasonable for a UUID.Zero group. | ||
337 | if (GroupID != UUID.Zero) | ||
338 | { | ||
339 | GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId); | ||
340 | |||
341 | if (gmd == null) | ||
342 | { | ||
343 | // m_log.WarnFormat( | ||
344 | // "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group", | ||
345 | // remoteClient.Name, GroupID, objectLocalID); | ||
346 | |||
347 | return; | ||
348 | } | ||
349 | } | ||
350 | |||
351 | SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID); | ||
352 | if (so != null) | ||
353 | { | ||
354 | if (so.OwnerID == remoteClient.AgentId) | ||
355 | { | ||
356 | so.SetGroup(GroupID, remoteClient); | ||
357 | } | ||
358 | } | ||
359 | } | ||
360 | |||
361 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) | 331 | private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) |
362 | { | 332 | { |
363 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 333 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |