aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/EstateManager.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-02 10:06:43 +0000
committerTeravus Ovares2008-01-02 10:06:43 +0000
commit3a83be1721155d606d564dfd4c3bd36560a95c4a (patch)
tree89522b7d998345fe49bcbfe3f501cb9033935105 /OpenSim/Region/Environment/EstateManager.cs
parent* Trying to address TextureSender issues (diff)
downloadopensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.zip
opensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.tar.gz
opensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.tar.bz2
opensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.tar.xz
* Did a bit of estate work. Added some fields to EstateSettings.xml for estate managers.
* You can put UUIDs in those fields to give other users some ability to help manage a sim you own. * Also started decoding the EstateOwnerMessage packet convolutions.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs78
1 files changed, 78 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index 3ca9796..d0dbaea 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -44,6 +44,15 @@ namespace OpenSim.Region.Environment
44 private Scene m_scene; 44 private Scene m_scene;
45 private RegionInfo m_regInfo; 45 private RegionInfo m_regInfo;
46 46
47 public enum EstateAccessCodex : uint
48 {
49 AccessOptions = 17,
50 AllowedGroups = 18,
51 EstateBans = 20,
52 EstateManagers = 24
53 }
54
55
47 public EstateManager(Scene scene, RegionInfo reginfo) 56 public EstateManager(Scene scene, RegionInfo reginfo)
48 { 57 {
49 m_scene = scene; 58 m_scene = scene;
@@ -146,7 +155,13 @@ namespace OpenSim.Region.Environment
146 switch (Helpers.FieldToUTF8String(packet.MethodData.Method)) 155 switch (Helpers.FieldToUTF8String(packet.MethodData.Method))
147 { 156 {
148 case "getinfo": 157 case "getinfo":
158
159
149 sendRegionInfoPacketToAll(); 160 sendRegionInfoPacketToAll();
161 if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId))
162 {
163 sendDetailedEstateData(remote_client, packet);
164 }
150 break; 165 break;
151 case "setregioninfo": 166 case "setregioninfo":
152 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId)) 167 if (m_scene.PermissionsMngr.CanEditEstateTerrain(remote_client.AgentId))
@@ -189,6 +204,69 @@ namespace OpenSim.Region.Environment
189 } 204 }
190 } 205 }
191 206
207 private void sendDetailedEstateData(IClientAPI remote_client, EstateOwnerMessagePacket packet)
208 {
209
210 LLUUID invoice = packet.MethodData.Invoice;
211 packet.AgentData.TransactionID = LLUUID.Random();
212 packet.MethodData.Method = Helpers.StringToField("estateupdateinfo");
213 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[9];
214
215 for (int i = 0; i < 9; i++)
216 {
217 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock();
218 }
219
220 //Sending Estate Settings
221 returnblock[0].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarFirstName + m_scene.RegionInfo.MasterAvatarLastName);
222 returnblock[1].Parameter = Helpers.StringToField(m_scene.RegionInfo.MasterAvatarAssignedUUID.ToString());
223 returnblock[2].Parameter = Helpers.IntToBytes((int)m_scene.RegionInfo.EstateSettings.estateID);
224 returnblock[3].Parameter = Helpers.IntToBytes(269516800);
225 returnblock[4].Parameter = Helpers.IntToBytes(0);
226 returnblock[5].Parameter = Helpers.IntToBytes(1);
227 returnblock[6].Parameter = Helpers.StringToField(LLUUID.Random().ToString());
228 returnblock[7].Parameter = Helpers.IntToBytes(1160895077);
229 returnblock[8].Parameter = Helpers.IntToBytes(1);
230 packet.ParamList = returnblock;
231 remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
232
233 // Stuck here at the moment The client sends a bunch of getinfo methods that need to be decoded the hard way
234 //Sending Estate Managers
235 packet = new EstateOwnerMessagePacket();
236 packet.AgentData.TransactionID = LLUUID.Random();
237 packet.AgentData.AgentID=remote_client.AgentId;
238 packet.AgentData.SessionID=remote_client.SessionId;
239 packet.MethodData.Invoice = invoice;
240 packet.MethodData.Method = Helpers.StringToField("setaccess");
241
242 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.estateManagers;
243
244 returnblock = new EstateOwnerMessagePacket.ParamListBlock[6+EstateManagers.Length];
245
246 for (int i = 0; i < (6 + EstateManagers.Length); i++)
247 {
248 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock();
249 }
250 int j=0;
251 returnblock[j].Parameter = Helpers.IntToBytes((int)m_scene.RegionInfo.EstateSettings.estateID); j++;
252 returnblock[j].Parameter = Helpers.IntToBytes((int)EstateAccessCodex.EstateManagers); j++;
253 returnblock[j].Parameter = Helpers.IntToBytes(0); j++;
254 returnblock[j].Parameter = Helpers.IntToBytes(0); j++;
255 returnblock[j].Parameter = Helpers.IntToBytes(0); j++;
256 returnblock[j].Parameter = Helpers.IntToBytes(EstateManagers.Length); j++;
257 for (int i = 0; i < EstateManagers.Length; i++)
258 {
259 returnblock[j].Parameter = Helpers.StringToField(EstateManagers[i].ToString()); j++;
260 }
261 packet.ParamList = returnblock;
262 remote_client.OutPacket(packet, ThrottleOutPacketType.Task);
263
264
265
266
267
268 }
269
192 private void estateSetRegionInfoHandler(EstateOwnerMessagePacket packet) 270 private void estateSetRegionInfoHandler(EstateOwnerMessagePacket packet)
193 { 271 {
194 if (packet.ParamList.Length != 9) 272 if (packet.ParamList.Length != 9)