From 4f6c4378dad0f4122bdab9270fd7aaf3c60beb39 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 28 Mar 2009 04:21:44 +0000 Subject: Add mute list request event and dummy response --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 28 ++++++++++++++++++++-- .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 6 +++++ .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 6 +++++ 3 files changed, 38 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 07f72c3..b65b3f9 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -303,6 +303,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP private PickInfoUpdate handlerPickInfoUpdate; private AvatarNotesUpdate handlerAvatarNotesUpdate; + private MuteListRequest handlerMuteListRequest; + private readonly IGroupsModule m_GroupsModule; //private TerrainUnacked handlerUnackedTerrain = null; @@ -1093,6 +1095,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event PickInfoUpdate OnPickInfoUpdate; public event AvatarNotesUpdate OnAvatarNotesUpdate; + public event MuteListRequest OnMuteListRequest; + public void ActivateGesture(UUID assetId, UUID gestureId) { } @@ -6822,8 +6826,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP //m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); break; case PacketType.MuteListRequest: - // TODO: handle this packet - //m_log.Warn("[CLIENT]: unhandled MuteListRequest packet"); + MuteListRequestPacket muteListRequest = + (MuteListRequestPacket)Pack; + + handlerMuteListRequest = OnMuteListRequest; + if (handlerMuteListRequest != null) + { + handlerMuteListRequest(this, muteListRequest.MuteData.MuteCRC); + } + else + { + SendUseCachedMuteList(); + } break; case PacketType.UseCircuitCode: // Don't display this one, we handle it at a lower level @@ -8676,6 +8690,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(createGroupReply, ThrottleOutPacketType.Task); } + public void SendUseCachedMuteList() + { + UseCachedMuteListPacket useCachedMuteList = (UseCachedMuteListPacket)PacketPool.Instance.GetPacket(PacketType.UseCachedMuteList); + + useCachedMuteList.AgentData = new UseCachedMuteListPacket.AgentDataBlock(); + useCachedMuteList.AgentData.AgentID = AgentId; + + OutPacket(useCachedMuteList, ThrottleOutPacketType.Task); + } + public string Report() { LLPacketHandler handler = (LLPacketHandler) m_PacketHandler; diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index c5b6a1e..fa01a42 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -260,6 +260,8 @@ namespace OpenSim.Region.Examples.SimpleModule public event PickInfoUpdate OnPickInfoUpdate; public event AvatarNotesUpdate OnAvatarNotesUpdate; + public event MuteListRequest OnMuteListRequest; + #pragma warning restore 67 private UUID myID = UUID.Random(); @@ -1062,6 +1064,10 @@ namespace OpenSim.Region.Examples.SimpleModule { } + public void SendUseCachedMuteList() + { + } + #endregion } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index e810b4e..4bf4341 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -366,6 +366,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event PickInfoUpdate OnPickInfoUpdate; public event AvatarNotesUpdate OnAvatarNotesUpdate; + public event MuteListRequest OnMuteListRequest; + #pragma warning restore 67 #endregion @@ -1062,6 +1064,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } + public void SendUseCachedMuteList() + { + } + #endregion } } -- cgit v1.1