aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-19 23:03:45 +0000
committerJustin Clark-Casey (justincc)2011-12-19 23:03:45 +0000
commit87a2d8d51b66db12a487014deb8447fb2432e2a3 (patch)
tree88b5985189fcd4af3849e1031e9d1e74ccedfc37 /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
parentStop sending the viewer its own AvatarAppearance packet. (diff)
downloadopensim-SC-87a2d8d51b66db12a487014deb8447fb2432e2a3.zip
opensim-SC-87a2d8d51b66db12a487014deb8447fb2432e2a3.tar.gz
opensim-SC-87a2d8d51b66db12a487014deb8447fb2432e2a3.tar.bz2
opensim-SC-87a2d8d51b66db12a487014deb8447fb2432e2a3.tar.xz
Move HandleObjectGroupUpdate() from GroupsModule to Scene.PacketHandlers.cs as this is updating SOG/SOP.GroupID, which is arguably generic.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index f9d0e0a..3355ebe 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>