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.avinationmerge
parent
37a7b87862
commit
6bac16fd88
|
@ -4372,37 +4372,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (bl[i].BannedUserID == UUID.Zero)
|
||||
continue;
|
||||
BannedUsers.Add(bl[i].BannedUserID);
|
||||
|
||||
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];
|
||||
|
||||
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++;
|
||||
|
||||
foreach (UUID banned in BannedUsers)
|
||||
{
|
||||
returnblock[j].Parameter = banned.GetBytes(); j++;
|
||||
}
|
||||
packet.ParamList = returnblock;
|
||||
packet.Header.Reliable = true;
|
||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||
|
||||
BannedUsers.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
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];
|
||||
|
||||
for (int i = 0; i < (6 + BannedUsers.Count); i++)
|
||||
{
|
||||
returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock();
|
||||
}
|
||||
int 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++;
|
||||
|
||||
foreach (UUID banned in BannedUsers)
|
||||
{
|
||||
returnblock[j].Parameter = banned.GetBytes(); j++;
|
||||
}
|
||||
packet.ParamList = returnblock;
|
||||
packet.Header.Reliable = false;
|
||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||
}
|
||||
|
||||
public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
|
||||
|
|
|
@ -62,8 +62,15 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
|
||||
#region Packet Data Responders
|
||||
|
||||
private void clientSendDetailedEstateData(IClientAPI remote_client, UUID invoice)
|
||||
{
|
||||
sendDetailedEstateData(remote_client, invoice);
|
||||
sendEstateLists(remote_client, invoice);
|
||||
}
|
||||
|
||||
private void sendDetailedEstateData(IClientAPI remote_client, UUID invoice)
|
||||
{
|
||||
m_log.DebugFormat("[ESTATE]: Invoice is {0}", invoice.ToString());
|
||||
uint sun = 0;
|
||||
|
||||
if (!Scene.RegionInfo.EstateSettings.UseGlobalTime)
|
||||
|
@ -83,7 +90,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
Scene.RegionInfo.RegionSettings.Covenant,
|
||||
Scene.RegionInfo.EstateSettings.AbuseEmail,
|
||||
estateOwner);
|
||||
}
|
||||
|
||||
private void sendEstateLists(IClientAPI remote_client, UUID invoice)
|
||||
{
|
||||
remote_client.SendEstateList(invoice,
|
||||
(int)Constants.EstateAccessCodex.EstateManagers,
|
||||
Scene.RegionInfo.EstateSettings.EstateManagers,
|
||||
|
@ -1121,7 +1131,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
|||
|
||||
private void EventManager_OnNewClient(IClientAPI client)
|
||||
{
|
||||
client.OnDetailedEstateDataRequest += sendDetailedEstateData;
|
||||
client.OnDetailedEstateDataRequest += clientSendDetailedEstateData;
|
||||
client.OnSetEstateFlagsRequest += estateSetRegionInfoHandler;
|
||||
// client.OnSetEstateTerrainBaseTexture += setEstateTerrainBaseTexture;
|
||||
client.OnSetEstateTerrainDetailTexture += setEstateTerrainBaseTexture;
|
||||
|
|
Loading…
Reference in New Issue