From 68814f904e1f0c5be961791f3f475dcda4a88248 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 31 Aug 2012 00:37:27 +0100 Subject: Replace SendBannedUserList with Avination's version. Untested in core. Not even test compiled. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 57 ++++++++++++---------- 1 file changed, 32 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 148d0e0..d05ffea 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4451,37 +4451,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (bl[i].BannedUserID == UUID.Zero) continue; BannedUsers.Add(bl[i].BannedUserID); - } - EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); - packet.AgentData.TransactionID = UUID.Random(); - packet.AgentData.AgentID = AgentId; - packet.AgentData.SessionID = SessionId; - packet.MethodData.Invoice = invoice; - packet.MethodData.Method = Utils.StringToBytes("setaccess"); + if (BannedUsers.Count >= 50 || (i == (bl.Length - 1) && BannedUsers.Count > 0)) + { + EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); + packet.AgentData.TransactionID = UUID.Random(); + packet.AgentData.AgentID = AgentId; + packet.AgentData.SessionID = SessionId; + packet.MethodData.Invoice = invoice; + packet.MethodData.Method = Utils.StringToBytes("setaccess"); - EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count]; + EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count]; - for (int i = 0; i < (6 + BannedUsers.Count); i++) - { - returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); - } - int j = 0; + int j; + for (j = 0; j < (6 + BannedUsers.Count); j++) + { + returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock(); + } + j = 0; - returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; - returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; - returnblock[j].Parameter = Utils.StringToBytes("0"); j++; - returnblock[j].Parameter = Utils.StringToBytes("0"); j++; - returnblock[j].Parameter = Utils.StringToBytes(BannedUsers.Count.ToString()); j++; - returnblock[j].Parameter = Utils.StringToBytes("0"); j++; + returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; + returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; + returnblock[j].Parameter = Utils.StringToBytes("0"); j++; + returnblock[j].Parameter = Utils.StringToBytes("0"); j++; + returnblock[j].Parameter = Utils.StringToBytes(BannedUsers.Count.ToString()); j++; + returnblock[j].Parameter = Utils.StringToBytes("0"); j++; - foreach (UUID banned in BannedUsers) - { - returnblock[j].Parameter = banned.GetBytes(); j++; + foreach (UUID banned in BannedUsers) + { + returnblock[j].Parameter = banned.GetBytes(); j++; + } + packet.ParamList = returnblock; + packet.Header.Reliable = true; + OutPacket(packet, ThrottleOutPacketType.Task); + + BannedUsers.Clear(); + } } - packet.ParamList = returnblock; - packet.Header.Reliable = false; - OutPacket(packet, ThrottleOutPacketType.Task); + } public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) -- cgit v1.1