aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2011-12-19 23:16:20 +0000
committerMelanie2011-12-19 23:16:20 +0000
commit2b4ebe657ce1f453d573d017658cb179b6d16c9a (patch)
tree8f5056eae2d3c8c906ca66bc82a08ed14ef2ac5f /OpenSim/Region/Framework/Scenes
parentMerge branch 'master' into careminster (diff)
parentMove HandleObjectGroupUpdate() from GroupsModule to Scene.PacketHandlers.cs a... (diff)
downloadopensim-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
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs39
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs11
2 files changed, 44 insertions, 6 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 {