From 2f13b68d4f4fd634eaee005bdf4c4a8e21c21c9a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 16 Nov 2017 17:50:06 +0000 Subject: add missing part of mutes list protocol --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 35 ++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4a76ffc..2ff6ced 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2307,11 +2307,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(remove, ThrottleOutPacketType.Asset); } +/* + private uint adjustControls(int input) + { + uint ret = (uint)input; + uint masked = ret & 0x0f; + masked <<= 19; + ret |= masked; + return ret; + } +*/ + public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) { ScriptControlChangePacket scriptcontrol = (ScriptControlChangePacket)PacketPool.Instance.GetPacket(PacketType.ScriptControlChange); ScriptControlChangePacket.DataBlock[] data = new ScriptControlChangePacket.DataBlock[1]; ScriptControlChangePacket.DataBlock ddata = new ScriptControlChangePacket.DataBlock(); +// ddata.Controls = adjustControls(controls); ddata.Controls = (uint)controls; ddata.PassToAgent = passToAgent; ddata.TakeControls = TakeControls; @@ -3762,6 +3774,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(useCachedMuteList, ThrottleOutPacketType.Task); } + public void SendEmpytMuteList() + { + GenericMessagePacket gmp = new GenericMessagePacket(); + + gmp.AgentData.AgentID = AgentId; + gmp.AgentData.SessionID = m_sessionId; + gmp.AgentData.TransactionID = UUID.Zero; + + gmp.MethodData.Method = Util.StringToBytes256("emptymutelist"); + gmp.ParamList = new GenericMessagePacket.ParamListBlock[1]; + gmp.ParamList[0] = new GenericMessagePacket.ParamListBlock(); + gmp.ParamList[0].Parameter = new byte[0]; + + OutPacket(gmp, ThrottleOutPacketType.Task); + } + public void SendMuteListUpdate(string filename) { MuteListUpdatePacket muteListUpdate = (MuteListUpdatePacket)PacketPool.Instance.GetPacket(PacketType.MuteListUpdate); @@ -11008,9 +11036,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - SendUseCachedMuteList(); + if(muteListRequest.MuteData.MuteCRC == 0) + SendEmpytMuteList(); + else + SendUseCachedMuteList(); } - return true; + return true; } private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) -- cgit v1.1