aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs64
1 files changed, 42 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index b170f28..2c05097 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -166,6 +166,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
166 private GenericCall4 handlerDeRezObject = null; //OnDeRezObject; 166 private GenericCall4 handlerDeRezObject = null; //OnDeRezObject;
167 private ModifyTerrain handlerModifyTerrain = null; 167 private ModifyTerrain handlerModifyTerrain = null;
168 private BakeTerrain handlerBakeTerrain = null; 168 private BakeTerrain handlerBakeTerrain = null;
169 private EstateChangeInfo handlerEstateChangeInfo = null;
169 private Action<IClientAPI> handlerRegionHandShakeReply = null; //OnRegionHandShakeReply; 170 private Action<IClientAPI> handlerRegionHandShakeReply = null; //OnRegionHandShakeReply;
170 private GenericCall2 handlerRequestWearables = null; //OnRequestWearables; 171 private GenericCall2 handlerRequestWearables = null; //OnRequestWearables;
171 private Action<IClientAPI> handlerRequestAvatarsData = null; //OnRequestAvatarsData; 172 private Action<IClientAPI> handlerRequestAvatarsData = null; //OnRequestAvatarsData;
@@ -920,6 +921,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
920 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; 921 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
921 public event SetRegionTerrainSettings OnSetRegionTerrainSettings; 922 public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
922 public event BakeTerrain OnBakeTerrain; 923 public event BakeTerrain OnBakeTerrain;
924 public event EstateChangeInfo OnEstateChangeInfo;
923 public event EstateRestartSimRequest OnEstateRestartSimRequest; 925 public event EstateRestartSimRequest OnEstateRestartSimRequest;
924 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; 926 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
925 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; 927 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
@@ -2614,18 +2616,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2614 this.OutPacket(packet, ThrottleOutPacketType.Task); 2616 this.OutPacket(packet, ThrottleOutPacketType.Task);
2615 } 2617 }
2616 2618
2617 public void SendBannedUserList(LLUUID invoice, List<RegionBanListItem> banlist, uint estateID) 2619 public void SendBannedUserList(LLUUID invoice, EstateBan[] bl, uint estateID)
2618 { 2620 {
2619 RegionBanListItem[] bl = banlist.ToArray(); 2621 List<LLUUID>BannedUsers = new List<LLUUID>();
2620
2621 LLUUID[] BannedUsers = new LLUUID[bl.Length];
2622
2623 2622
2624 for (int i = 0; i < bl.Length; i++) 2623 for (int i = 0; i < bl.Length; i++)
2625 { 2624 {
2626 if (bl[i] == null) 2625 if (bl[i] == null)
2627 continue; 2626 continue;
2628 BannedUsers[i] = bl[i].bannedUUID; 2627 if (bl[i].bannedUUID == LLUUID.Zero)
2628 continue;
2629 BannedUsers.Add(bl[i].bannedUUID);
2629 } 2630 }
2630 2631
2631 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 2632 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
@@ -2635,9 +2636,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2635 packet.MethodData.Invoice = invoice; 2636 packet.MethodData.Invoice = invoice;
2636 packet.MethodData.Method = Helpers.StringToField("setaccess"); 2637 packet.MethodData.Method = Helpers.StringToField("setaccess");
2637 2638
2638 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Length]; 2639 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count];
2639 2640
2640 for (int i = 0; i < (6 + BannedUsers.Length); i++) 2641 for (int i = 0; i < (6 + BannedUsers.Count); i++)
2641 { 2642 {
2642 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); 2643 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock();
2643 } 2644 }
@@ -2647,12 +2648,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2647 returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++; 2648 returnblock[j].Parameter = Helpers.StringToField(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++;
2648 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2649 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
2649 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2650 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
2650 returnblock[j].Parameter = Helpers.StringToField(BannedUsers.Length.ToString()); j++; 2651 returnblock[j].Parameter = Helpers.StringToField(BannedUsers.Count.ToString()); j++;
2651 returnblock[j].Parameter = Helpers.StringToField("0"); j++; 2652 returnblock[j].Parameter = Helpers.StringToField("0"); j++;
2652 2653
2653 for (int i = 0; i < BannedUsers.Length; i++) 2654 foreach (LLUUID banned in BannedUsers)
2654 { 2655 {
2655 returnblock[j].Parameter = BannedUsers[i].GetBytes(); j++; 2656 returnblock[j].Parameter = banned.GetBytes(); j++;
2656 } 2657 }
2657 packet.ParamList = returnblock; 2658 packet.ParamList = returnblock;
2658 packet.Header.Reliable = false; 2659 packet.Header.Reliable = false;
@@ -2687,11 +2688,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2687 this.OutPacket(rinfopack, ThrottleOutPacketType.Task); 2688 this.OutPacket(rinfopack, ThrottleOutPacketType.Task);
2688 } 2689 }
2689 2690
2690 public void SendEstateCovenantInformation() 2691 public void SendEstateCovenantInformation(LLUUID covenant)
2691 { 2692 {
2692 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); 2693 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
2693 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); 2694 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
2694 edata.CovenantID = m_scene.RegionInfo.CovenantID; 2695 edata.CovenantID = covenant;
2695 edata.CovenantTimestamp = 0; 2696 edata.CovenantTimestamp = 0;
2696 edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 2697 edata.EstateOwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
2697 edata.EstateName = 2698 edata.EstateName =
@@ -2700,7 +2701,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2700 this.OutPacket(einfopack, ThrottleOutPacketType.Task); 2701 this.OutPacket(einfopack, ThrottleOutPacketType.Task);
2701 } 2702 }
2702 2703
2703 public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID) 2704 public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant)
2704 { 2705 {
2705 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 2706 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
2706 packet.MethodData.Invoice = invoice; 2707 packet.MethodData.Invoice = invoice;
@@ -2718,13 +2719,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2718 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString()); 2719 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString());
2719 returnblock[2].Parameter = Helpers.StringToField(estateID.ToString()); 2720 returnblock[2].Parameter = Helpers.StringToField(estateID.ToString());
2720 2721
2721 // TODO: Resolve Magic numbers here 2722 returnblock[3].Parameter = Helpers.StringToField(estateFlags.ToString());
2722 returnblock[3].Parameter = Helpers.StringToField("269516800"); 2723 returnblock[4].Parameter = Helpers.StringToField(sunPosition.ToString());
2723 returnblock[4].Parameter = Helpers.StringToField("0"); 2724 returnblock[5].Parameter = Helpers.StringToField(parentEstate.ToString());
2724 returnblock[5].Parameter = Helpers.StringToField("1"); 2725 returnblock[6].Parameter = Helpers.StringToField(covenant.ToString());
2725 returnblock[6].Parameter = Helpers.StringToField(m_scene.RegionInfo.RegionID.ToString()); 2726 returnblock[7].Parameter = Helpers.StringToField("1160895077"); // what is this?
2726 returnblock[7].Parameter = Helpers.StringToField("1160895077"); 2727 returnblock[8].Parameter = Helpers.StringToField("1"); // what is this?
2727 returnblock[8].Parameter = Helpers.StringToField("1");
2728 2728
2729 packet.ParamList = returnblock; 2729 packet.ParamList = returnblock;
2730 packet.Header.Reliable = false; 2730 packet.Header.Reliable = false;
@@ -5959,10 +5959,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5959 tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter); 5959 tmp = Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter);
5960 if (!tmp.Contains(".")) tmp += ".00"; 5960 if (!tmp.Contains(".")) tmp += ".00";
5961 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); 5961 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp);
5962 bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter);
5962 bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); 5963 bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter);
5963 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter)); 5964 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[5].Parameter));
5965 bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter);
5966 bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter);
5967 float EstateSunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(messagePacket.ParamList[8].Parameter));
5964 5968
5965 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour); 5969 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour);
5966 5970
5967 } 5971 }
5968 catch (Exception ex) 5972 catch (Exception ex)
@@ -6076,6 +6080,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6076 } 6080 }
6077 break; 6081 break;
6078 6082
6083 case "estatechangeinfo":
6084 if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId))
6085 {
6086 LLUUID invoice = messagePacket.MethodData.Invoice;
6087 LLUUID SenderID = messagePacket.AgentData.AgentID;
6088 UInt32 param1 = Convert.ToUInt32(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter));
6089 UInt32 param2 = Convert.ToUInt32(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter));
6090
6091 handlerEstateChangeInfo = OnEstateChangeInfo;
6092 if (handlerEstateChangeInfo != null)
6093 {
6094 handlerEstateChangeInfo(this, invoice, SenderID, param1, param2);
6095 }
6096 }
6097 break;
6098
6079 default: 6099 default:
6080 m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket.ToString()); 6100 m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket.ToString());
6081 break; 6101 break;