mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Move HandleObjectGroupUpdate() from GroupsModule to Scene.PacketHandlers.cs as this is updating SOG/SOP.GroupID, which is arguably generic.
This commit is contained in:
@@ -218,7 +218,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
client.OnUUIDGroupNameRequest += HandleUUIDGroupNameRequest;
|
||||
client.OnObjectGroupRequest += HandleObjectGroupUpdate;
|
||||
client.OnAgentDataUpdateRequest += OnAgentDataUpdateRequest;
|
||||
client.OnDirFindQuery += OnDirFindQuery;
|
||||
client.OnRequestAvatarProperties += OnRequestAvatarProperties;
|
||||
@@ -329,35 +328,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||
remoteClient.SendGroupNameReply(GroupID, GroupName);
|
||||
}
|
||||
|
||||
private void HandleObjectGroupUpdate(
|
||||
IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
|
||||
{
|
||||
// XXX: Might be better to get rid of this special casing and have GetMembershipData return something
|
||||
// reasonable for a UUID.Zero group.
|
||||
if (GroupID != UUID.Zero)
|
||||
{
|
||||
GroupMembershipData gmd = GetMembershipData(GroupID, remoteClient.AgentId);
|
||||
|
||||
if (gmd == null)
|
||||
{
|
||||
// m_log.WarnFormat(
|
||||
// "[GROUPS]: User {0} is not a member of group {1} so they can't update {2} to this group",
|
||||
// remoteClient.Name, GroupID, objectLocalID);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SceneObjectGroup so = ((Scene)remoteClient.Scene).GetGroupByPrim(objectLocalID);
|
||||
if (so != null)
|
||||
{
|
||||
if (so.OwnerID == remoteClient.AgentId)
|
||||
{
|
||||
so.SetGroup(GroupID, remoteClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
Reference in New Issue
Block a user