aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs65
1 files changed, 39 insertions, 26 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 83b763e..db0c3b8 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2787,32 +2787,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2787 2787
2788 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) 2788 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
2789 { 2789 {
2790 AvatarGroupsReplyPacket p = (AvatarGroupsReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarGroupsReply); 2790 OSDMap llsd = new OSDMap(3);
2791 2791 OSDArray AgentData = new OSDArray(1);
2792 p.AgentData = new AvatarGroupsReplyPacket.AgentDataBlock(); 2792 OSDMap AgentDataMap = new OSDMap(1);
2793 p.AgentData.AgentID = AgentId; 2793 AgentDataMap.Add("AgentID", OSD.FromUUID(this.AgentId));
2794 p.AgentData.AvatarID = avatarID; 2794 AgentDataMap.Add("AvatarID", OSD.FromUUID(avatarID));
2795 2795 AgentData.Add(AgentDataMap);
2796 p.GroupData = new AvatarGroupsReplyPacket.GroupDataBlock[data.Length]; 2796 llsd.Add("AgentData", AgentData);
2797 2797 OSDArray GroupData = new OSDArray(data.Length);
2798 for (int i = 0; i < data.Length; i++) 2798 OSDArray NewGroupData = new OSDArray(data.Length);
2799 { 2799 foreach (GroupMembershipData m in data)
2800 GroupMembershipData m = data[i]; 2800 {
2801 2801 OSDMap GroupDataMap = new OSDMap(6);
2802 AvatarGroupsReplyPacket.GroupDataBlock block = new AvatarGroupsReplyPacket.GroupDataBlock(); 2802 OSDMap NewGroupDataMap = new OSDMap(1);
2803 block.GroupPowers = m.GroupPowers; 2803 GroupDataMap.Add("GroupPowers", OSD.FromBinary(m.GroupPowers));
2804 block.AcceptNotices = m.AcceptNotices; 2804 GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices));
2805 block.GroupTitle = Util.StringToBytes256(m.GroupTitle.Length > 20 ? m.GroupTitle.Substring(0, 20) : m.GroupTitle); 2805 GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle));
2806 block.GroupID = m.GroupID; 2806 GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID));
2807 block.GroupName = Util.StringToBytes256(m.GroupName.Length > 35 ? m.GroupName.Substring(0, 35) : m.GroupName); 2807 GroupDataMap.Add("GroupName", OSD.FromString(m.GroupName));
2808 block.GroupInsigniaID = m.GroupPicture; 2808 GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(m.GroupPicture));
2809 2809 NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(m.ListInProfile));
2810 p.GroupData[i] = block; 2810 GroupData.Add(GroupDataMap);
2811 } 2811 NewGroupData.Add(NewGroupDataMap);
2812 2812 }
2813 p.NewGroupData.ListInProfile = true; 2813 llsd.Add("GroupData", GroupData);
2814 2814 llsd.Add("NewGroupData", NewGroupData);
2815 OutPacket(p, ThrottleOutPacketType.Task); 2815
2816 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
2817 if (eq != null)
2818 {
2819 eq.Enqueue(BuildEvent("AvatarGroupsReply", llsd), this.AgentId);
2820 }
2816 } 2821 }
2817 2822
2818 public void SendJoinGroupReply(UUID groupID, bool success) 2823 public void SendJoinGroupReply(UUID groupID, bool success)
@@ -10299,5 +10304,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10299 } 10304 }
10300 #endregion 10305 #endregion
10301 10306
10307 public static OSD BuildEvent(string eventName, OSD eventBody)
10308 {
10309 OSDMap osdEvent = new OSDMap(2);
10310 osdEvent.Add("message", new OSDString(eventName));
10311 osdEvent.Add("body", eventBody);
10312
10313 return osdEvent;
10314 }
10302 } 10315 }
10303} 10316}