diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index f5fd5f5f42..a76c89ee76 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1457,6 +1457,7 @@ namespace OpenSim.Framework void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags); void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data); + void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data); void SendOfferCallingCard(UUID srcID, UUID transactionID); void SendAcceptCallingCard(UUID transactionID); void SendDeclineCallingCard(UUID transactionID); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 57c703072a..a524561c05 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3404,6 +3404,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) + { + OSDMap llsd = new OSDMap(3); + OSDArray AgentData = new OSDArray(1); + OSDMap AgentDataMap = new OSDMap(1); + AgentDataMap.Add("AgentID", OSD.FromUUID(this.AgentId)); + AgentDataMap.Add("AvatarID", OSD.FromUUID(avatarID)); + AgentData.Add(AgentDataMap); + llsd.Add("AgentData", AgentData); + OSDArray GroupData = new OSDArray(data.Length); + OSDArray NewGroupData = new OSDArray(data.Length); + foreach (GroupMembershipData m in data) + { + OSDMap GroupDataMap = new OSDMap(6); + OSDMap NewGroupDataMap = new OSDMap(1); + GroupDataMap.Add("GroupPowers", OSD.FromULong(m.GroupPowers)); + GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices)); + GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle)); + GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID)); + GroupDataMap.Add("GroupName", OSD.FromString(m.GroupName)); + GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(m.GroupPicture)); + NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(m.ListInProfile)); + GroupData.Add(GroupDataMap); + NewGroupData.Add(NewGroupDataMap); + } + llsd.Add("GroupData", GroupData); + llsd.Add("NewGroupData", NewGroupData); + + IEventQueue eq = this.Scene.RequestModuleInterface(); + if (eq != null) + { + eq.Enqueue(BuildEvent("AgentGroupDataUpdate", llsd), this.AgentId); + } + } + public void SendJoinGroupReply(UUID groupID, bool success) { JoinGroupReplyPacket p = (JoinGroupReplyPacket)PacketPool.Instance.GetPacket(PacketType.JoinGroupReply); diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index a34f6ee89c..6a96d4d965 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1573,7 +1573,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) { - + + } + + public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) + { + } public void SendOfferCallingCard(UUID srcID, UUID transactionID) diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 35af6e7fd0..15e388420d 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -1183,6 +1183,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) + { + } + public void SendTerminateFriend(UUID exFriendID) { } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index f0344436d0..76ee5c2b26 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -1208,6 +1208,10 @@ namespace OpenSim.Tests.Common { } + public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) + { + } + public void SendJoinGroupReply(UUID groupID, bool success) { }