diff options
author | Melanie | 2011-05-15 14:55:36 +0200 |
---|---|---|
committer | Melanie | 2011-05-15 14:55:36 +0200 |
commit | 6bac16fd884a51a7874348928d45c883f9d5968f (patch) | |
tree | 2d4ce954176ff09affe10b1df1b2a4b856cbc5e5 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-6bac16fd884a51a7874348928d45c883f9d5968f.zip opensim-SC_OLD-6bac16fd884a51a7874348928d45c883f9d5968f.tar.gz opensim-SC_OLD-6bac16fd884a51a7874348928d45c883f9d5968f.tar.bz2 opensim-SC_OLD-6bac16fd884a51a7874348928d45c883f9d5968f.tar.xz |
Fix up handling of the estate dialog to prevent duplication of ban list names.
Allow more than 61 names in ban list without crashing the viewer.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7564907..05e6d27 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -4372,37 +4372,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4372 | if (bl[i].BannedUserID == UUID.Zero) | 4372 | if (bl[i].BannedUserID == UUID.Zero) |
4373 | continue; | 4373 | continue; |
4374 | BannedUsers.Add(bl[i].BannedUserID); | 4374 | BannedUsers.Add(bl[i].BannedUserID); |
4375 | } | ||
4376 | 4375 | ||
4377 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 4376 | if (BannedUsers.Count >= 50 || (i == (bl.Length - 1) && BannedUsers.Count > 0)) |
4378 | packet.AgentData.TransactionID = UUID.Random(); | 4377 | { |
4379 | packet.AgentData.AgentID = AgentId; | 4378 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); |
4380 | packet.AgentData.SessionID = SessionId; | 4379 | packet.AgentData.TransactionID = UUID.Random(); |
4381 | packet.MethodData.Invoice = invoice; | 4380 | packet.AgentData.AgentID = AgentId; |
4382 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); | 4381 | packet.AgentData.SessionID = SessionId; |
4382 | packet.MethodData.Invoice = invoice; | ||
4383 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); | ||
4383 | 4384 | ||
4384 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count]; | 4385 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count]; |
4385 | 4386 | ||
4386 | for (int i = 0; i < (6 + BannedUsers.Count); i++) | 4387 | int j; |
4387 | { | 4388 | for (j = 0; j < (6 + BannedUsers.Count); j++) |
4388 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); | 4389 | { |
4389 | } | 4390 | returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock(); |
4390 | int j = 0; | 4391 | } |
4392 | j = 0; | ||
4391 | 4393 | ||
4392 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; | 4394 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; |
4393 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; | 4395 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; |
4394 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 4396 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
4395 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 4397 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
4396 | returnblock[j].Parameter = Utils.StringToBytes(BannedUsers.Count.ToString()); j++; | 4398 | returnblock[j].Parameter = Utils.StringToBytes(BannedUsers.Count.ToString()); j++; |
4397 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 4399 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
4398 | 4400 | ||
4399 | foreach (UUID banned in BannedUsers) | 4401 | foreach (UUID banned in BannedUsers) |
4400 | { | 4402 | { |
4401 | returnblock[j].Parameter = banned.GetBytes(); j++; | 4403 | returnblock[j].Parameter = banned.GetBytes(); j++; |
4404 | } | ||
4405 | packet.ParamList = returnblock; | ||
4406 | packet.Header.Reliable = true; | ||
4407 | OutPacket(packet, ThrottleOutPacketType.Task); | ||
4408 | |||
4409 | BannedUsers.Clear(); | ||
4410 | } | ||
4402 | } | 4411 | } |
4403 | packet.ParamList = returnblock; | 4412 | |
4404 | packet.Header.Reliable = false; | ||
4405 | OutPacket(packet, ThrottleOutPacketType.Task); | ||
4406 | } | 4413 | } |
4407 | 4414 | ||
4408 | public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) | 4415 | public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) |