aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2008-07-18 02:40:47 +0000
committerMelanie Thielker2008-07-18 02:40:47 +0000
commit263633e274082135b21b8183b92280b768d18883 (patch)
treef6104eef3633a8b454a4e8ac09d15182970c6bae /OpenSim/Framework
parentadded region port number to output of "show regions" command (diff)
downloadopensim-SC-263633e274082135b21b8183b92280b768d18883.zip
opensim-SC-263633e274082135b21b8183b92280b768d18883.tar.gz
opensim-SC-263633e274082135b21b8183b92280b768d18883.tar.bz2
opensim-SC-263633e274082135b21b8183b92280b768d18883.tar.xz
Patch #9151
Makes the estate dialog fully functional. Implements all client facing functionality. Moves estate data from estate_settings.xml, which is used to provide defaults, to the region data store. Creates one estate for each region, and places the region in it. Converts all region bans to estate bans.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/EstateBan.cs (renamed from OpenSim/Framework/RegionBanListItem.cs)10
-rw-r--r--OpenSim/Framework/EstateSettings.cs660
-rw-r--r--OpenSim/Framework/IClientAPI.cs10
-rw-r--r--OpenSim/Framework/RegionInfo.cs41
-rw-r--r--OpenSim/Framework/RegionSettings.cs13
5 files changed, 348 insertions, 386 deletions
diff --git a/OpenSim/Framework/RegionBanListItem.cs b/OpenSim/Framework/EstateBan.cs
index edf6a22..c213344 100644
--- a/OpenSim/Framework/RegionBanListItem.cs
+++ b/OpenSim/Framework/EstateBan.cs
@@ -32,16 +32,12 @@ using System.Text;
32 32
33namespace OpenSim.Framework 33namespace OpenSim.Framework
34{ 34{
35 public class RegionBanListItem 35 public class EstateBan
36 { 36 {
37 public LLUUID regionUUID = LLUUID.Zero; 37 public uint estateID = 1;
38 public LLUUID bannedUUID = LLUUID.Zero; 38 public LLUUID bannedUUID = LLUUID.Zero;
39 public string bannedIP = string.Empty; 39 public string bannedIP = string.Empty;
40 public string bannedIPHostMask = string.Empty; 40 public string bannedIPHostMask = string.Empty;
41 41 public string bannedNameMask = string.Empty;
42 public RegionBanListItem()
43 {
44
45 }
46 } 42 }
47} 43}
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 2865844..b48a1db 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using System.Collections.Generic;
31using libsecondlife; 32using libsecondlife;
32using log4net; 33using log4net;
33 34
@@ -38,451 +39,440 @@ namespace OpenSim.Framework
38 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
39 private ConfigurationMember configMember; 40 private ConfigurationMember configMember;
40 41
41 //Settings to this island 42 public delegate void SaveDelegate(EstateSettings rs);
42 private float m_billableFactor;
43
44 private uint m_estateID;
45 private LLUUID m_estateManager0;
46 private LLUUID m_estateManager1;
47 private LLUUID m_estateManager2;
48 private LLUUID m_estateManager3;
49 private LLUUID m_estateManager4;
50 private LLUUID m_estateManager5;
51 private LLUUID m_estateManager6;
52 private LLUUID m_estateManager7;
53 private LLUUID m_estateManager8;
54 private LLUUID m_estateManager9;
55 private string m_estateName;
56
57 private uint m_parentEstateID;
58 private int m_pricePerMeter;
59 private int m_redirectGridX;
60 private int m_redirectGridY;
61 43
62 public EstateSettings() 44 public event SaveDelegate OnSave;
45
46 // Only the client uses these
47 //
48 private uint m_EstateID = 100;
49
50 public uint EstateID
63 { 51 {
64 // Temporary hack to prevent multiple loadings. 52 get { return m_EstateID; }
65 if (configMember == null) 53 set { m_EstateID = value; }
66 {
67 configMember =
68 new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS",
69 loadConfigurationOptions, handleIncomingConfiguration, true);
70 configMember.performConfigurationRetrieve();
71 }
72 } 54 }
73 55
74 public float billableFactor 56 private string m_EstateName;
57
58 public string EstateName
75 { 59 {
76 get { return m_billableFactor; } 60 get { return m_EstateName; }
77 set 61 set { m_EstateName = value; }
78 {
79 m_billableFactor = value;
80 configMember.forceSetConfigurationOption("billable_factor", m_billableFactor.ToString());
81 }
82 } 62 }
83 63
84 public uint estateID 64 private uint m_ParentEstateID = 100;
65
66 public uint ParentEstateID
85 { 67 {
86 get { return m_estateID; } 68 get { return m_ParentEstateID; }
87 set 69 set { m_ParentEstateID = value; }
88 {
89 m_estateID = value;
90 configMember.forceSetConfigurationOption("estate_id", m_estateID.ToString());
91 }
92 } 70 }
93 71
94 public uint parentEstateID 72 private float m_BillableFactor;
73
74 public float BillableFactor
95 { 75 {
96 get { return m_parentEstateID; } 76 get { return m_BillableFactor; }
97 set 77 set { m_BillableFactor = value; }
98 {
99 m_parentEstateID = value;
100 configMember.forceSetConfigurationOption("parent_estate_id", m_parentEstateID.ToString());
101 }
102 } 78 }
103 79
104 public int redirectGridX 80 private int m_PricePerMeter;
81
82 public int PricePerMeter
105 { 83 {
106 get { return m_redirectGridX; } 84 get { return m_PricePerMeter; }
107 set 85 set { m_PricePerMeter = value; }
108 {
109 m_redirectGridX = value;
110 configMember.forceSetConfigurationOption("redirect_grid_x", m_redirectGridX.ToString());
111 }
112 } 86 }
113 87
114 public int redirectGridY 88 private int m_RedirectGridX;
89
90 public int RedirectGridX
115 { 91 {
116 get { return m_redirectGridY; } 92 get { return m_RedirectGridX; }
117 set 93 set { m_RedirectGridX = value; }
118 {
119 m_redirectGridY = value;
120 configMember.forceSetConfigurationOption("redirect_grid_y", m_redirectGridY.ToString());
121 }
122 } 94 }
123 95
124 public int pricePerMeter 96 private int m_RedirectGridY;
97
98 public int RedirectGridY
125 { 99 {
126 get { return m_pricePerMeter; } 100 get { return m_RedirectGridY; }
127 set 101 set { m_RedirectGridY = value; }
128 {
129 m_pricePerMeter = value;
130 configMember.forceSetConfigurationOption("price_per_meter", m_pricePerMeter.ToString());
131 }
132 } 102 }
133 103
134 // Estate name 104 // Used by the sim
105 //
106 private bool m_UseGlobalTime = true;
135 107
136 public string estateName 108 public bool UseGlobalTime
137 { 109 {
138 get { return m_estateName; } 110 get { return m_UseGlobalTime; }
139 set 111 set { m_UseGlobalTime = value; }
140 {
141 m_estateName = value;
142 configMember.forceSetConfigurationOption("estate_name", m_estateName.ToString());
143 }
144 } 112 }
145 113
146 public LLUUID[] estateManagers 114 private bool m_FixedSun = false;
115
116 public bool FixedSun
147 { 117 {
148 get 118 get { return m_FixedSun; }
149 { 119 set { m_FixedSun = value; }
150 // returns a condensed array of LLUUIDs
151 return GetEstateManagers();
152 }
153 set
154 {
155 // Sets a Condensed array of LLUUIDS
156 int i = 0;
157 for (i = 0; i < value.Length; i++)
158 {
159 switch (i)
160 {
161 case 0:
162 m_estateManager0 = value[i];
163 break;
164 case 1:
165 m_estateManager1 = value[i];
166 break;
167 case 2:
168 m_estateManager2 = value[i];
169 break;
170 case 3:
171 m_estateManager3 = value[i];
172 break;
173 case 4:
174 m_estateManager4 = value[i];
175 break;
176 case 5:
177 m_estateManager5 = value[i];
178 break;
179 case 6:
180 m_estateManager6 = value[i];
181 break;
182 case 7:
183 m_estateManager7 = value[i];
184 break;
185 case 8:
186 m_estateManager8 = value[i];
187 break;
188 case 9:
189 m_estateManager9 = value[i];
190 break;
191 }
192 }
193
194 // Clear the rest of them.. as they're no longer valid
195 for (int j = i; j < 10; j++)
196 {
197 switch (j)
198 {
199 case 0:
200 m_estateManager0 = LLUUID.Zero;
201 break;
202 case 1:
203 m_estateManager1 = LLUUID.Zero;
204 break;
205 case 2:
206 m_estateManager2 = LLUUID.Zero;
207 break;
208 case 3:
209 m_estateManager3 = LLUUID.Zero;
210 break;
211 case 4:
212 m_estateManager4 = LLUUID.Zero;
213 break;
214 case 5:
215 m_estateManager5 = LLUUID.Zero;
216 break;
217 case 6:
218 m_estateManager6 = LLUUID.Zero;
219 break;
220 case 7:
221 m_estateManager7 = LLUUID.Zero;
222 break;
223 case 8:
224 m_estateManager8 = LLUUID.Zero;
225 break;
226 case 9:
227 m_estateManager9 = LLUUID.Zero;
228 break;
229 }
230 }
231
232 for (i = 0; i < 10; i++)
233 {
234 // Writes out the Estate managers to the XML file.
235 configMember.forceSetConfigurationOption("estate_manager_" + i, (GetEstateManagerAtPos(i)).ToString());
236 }
237 }
238 } 120 }
239 121
240 #region EstateManager Get Methods to sort out skipped spots in the XML (suser error) 122 private double m_SunPosition = 0.0;
241 123
242 private LLUUID GetEstateManagerAtPos(int pos) 124 public double SunPosition
243 { 125 {
244 // This is a helper for writing them out to the xml file 126 get { return m_SunPosition; }
245 switch (pos) 127 set { m_SunPosition = value; }
246 { 128 }
247 case 0:
248 return m_estateManager0;
249 129
250 case 1: 130 private bool m_AllowVoice = true;
251 return m_estateManager1;
252 131
253 case 2: 132 public bool AllowVoice
254 return m_estateManager2; 133 {
134 get { return m_AllowVoice; }
135 set { m_AllowVoice = value; }
136 }
255 137
256 case 3: 138 private bool m_AllowDirectTeleport = true;
257 return m_estateManager3;
258 139
259 case 4: 140 public bool AllowDirectTeleport
260 return m_estateManager4; 141 {
142 get { return m_AllowDirectTeleport; }
143 set { m_AllowDirectTeleport = value; }
144 }
261 145
262 case 5: 146 private bool m_DenyAnonymous = false;
263 return m_estateManager5;
264 147
265 case 6: 148 public bool DenyAnonymous
266 return m_estateManager6; 149 {
150 get { return m_DenyAnonymous; }
151 set { m_DenyAnonymous = value; }
152 }
267 153
268 case 7: 154 private bool m_DenyIdentified = false;
269 return m_estateManager7;
270 155
271 case 8: 156 public bool DenyIdentified
272 return m_estateManager8; 157 {
158 get { return m_DenyIdentified; }
159 set { m_DenyIdentified = value; }
160 }
273 161
274 case 9: 162 private bool m_DenyTransacted = false;
275 return m_estateManager9;
276 163
277 default: 164 public bool DenyTransacted
278 return LLUUID.Zero; 165 {
279 } 166 get { return m_DenyTransacted; }
167 set { m_DenyTransacted = value; }
280 } 168 }
281 169
282 private LLUUID[] GetEstateManagers() 170 private bool m_AbuseEmailToEstateOwner = false;
171
172 public bool AbuseEmailToEstateOwner
283 { 173 {
284 int numEstateManagers = GetNumberOfEstateManagers(); 174 get { return m_AbuseEmailToEstateOwner; }
285 LLUUID[] rEstateManagers = new LLUUID[numEstateManagers]; 175 set { m_AbuseEmailToEstateOwner = value; }
176 }
286 177
287 int pos = 0; 178 private bool m_BlockDwell = false;
288 179
289 for (int i = 0; i < numEstateManagers; i++) 180 public bool BlockDwell
290 { 181 {
291 pos = GetNextEstateManager(pos); 182 get { return m_BlockDwell; }
292 183 set { m_BlockDwell = value; }
293 rEstateManagers[i] = GetEstateManagerAtPos(pos);
294 pos++;
295 }
296 return rEstateManagers;
297 } 184 }
298 185
299 private int GetNextEstateManager(int startpos) 186 private bool m_EstateSkipScripts = false;
187
188 public bool EstateSkipScripts
300 { 189 {
301 // This is a utility function that skips over estate managers set to LLUUID.Zero 190 get { return m_EstateSkipScripts; }
302 int i = startpos; 191 set { m_EstateSkipScripts = value; }
303 for (i = startpos; i < 10; i++)
304 {
305 if (GetEstateManagerAtPos(i) != LLUUID.Zero) return i;
306 }
307 return i;
308 } 192 }
309 193
310 private int GetNumberOfEstateManagers() 194 private bool m_ResetHomeOnTeleport = false;
195
196 public bool ResetHomeOnTeleport
311 { 197 {
312 // This function returns the number of estate managers set 198 get { return m_ResetHomeOnTeleport; }
313 // Regardless of whether there is a skipped spot 199 set { m_ResetHomeOnTeleport = value; }
314 int numEstateManagers = 0; 200 }
315 if (m_estateManager0 != LLUUID.Zero) numEstateManagers++;
316 if (m_estateManager1 != LLUUID.Zero) numEstateManagers++;
317 if (m_estateManager2 != LLUUID.Zero) numEstateManagers++;
318 if (m_estateManager3 != LLUUID.Zero) numEstateManagers++;
319 if (m_estateManager4 != LLUUID.Zero) numEstateManagers++;
320 if (m_estateManager5 != LLUUID.Zero) numEstateManagers++;
321 if (m_estateManager6 != LLUUID.Zero) numEstateManagers++;
322 if (m_estateManager7 != LLUUID.Zero) numEstateManagers++;
323 if (m_estateManager8 != LLUUID.Zero) numEstateManagers++;
324 if (m_estateManager9 != LLUUID.Zero) numEstateManagers++;
325 201
326 return numEstateManagers; 202 private bool m_TaxFree = false;
203
204 public bool TaxFree
205 {
206 get { return m_TaxFree; }
207 set { m_TaxFree = value; }
327 } 208 }
328 209
329 public void AddEstateManager(LLUUID avatarID) 210 private bool m_PublicAccess = true;
211
212 public bool PublicAccess
330 { 213 {
331 LLUUID[] testateManagers = GetEstateManagers(); 214 get { return m_PublicAccess; }
332 LLUUID[] nestateManagers = new LLUUID[testateManagers.Length + 1]; 215 set { m_PublicAccess = value; }
216 }
333 217
334 int i = 0; 218 // All those lists...
335 for (i = 0; i < testateManagers.Length; i++) 219 //
336 { 220 private List<LLUUID> l_EstateManagers = new List<LLUUID>();
337 nestateManagers[i] = testateManagers[i];
338 }
339 221
340 nestateManagers[i] = avatarID; 222 public LLUUID[] EstateManagers
223 {
224 get { return l_EstateManagers.ToArray(); }
225 set { l_EstateManagers = new List<LLUUID>(value); }
226 }
341 227
342 //Saves it to the estate settings file 228 private List<EstateBan> l_EstateBans = new List<EstateBan>();
343 estateManagers = nestateManagers; 229
230 public EstateBan[] EstateBans
231 {
232 get { return l_EstateBans.ToArray(); }
233 set { l_EstateBans = new List<EstateBan>(value); }
344 } 234 }
345 235
346 public void RemoveEstateManager(LLUUID avatarID) 236 private List<LLUUID> l_EstateAccess = new List<LLUUID>();
237
238 public LLUUID[] EstateAccess
347 { 239 {
348 int notfoundparam = 11; // starting high so the condense routine (max ten) doesn't run if we don't find it. 240 get { return l_EstateAccess.ToArray(); }
349 LLUUID[] testateManagers = GetEstateManagers(); // temporary estate managers list 241 set { l_EstateAccess = new List<LLUUID>(value); }
242 }
350 243
244 private List<LLUUID> l_EstateGroups = new List<LLUUID>();
351 245
352 int i = 0; 246 public LLUUID[] EstateGroups
353 int foundpos = notfoundparam; 247 {
248 get { return l_EstateGroups.ToArray(); }
249 set { l_EstateGroups = new List<LLUUID>(value); }
250 }
354 251
355 // search for estate manager. 252 public EstateSettings()
356 for (i = 0; i < testateManagers.Length; i++) 253 {
254 if (configMember == null)
357 { 255 {
358 if (testateManagers[i] == avatarID) 256 // Load legacy defaults
359 { 257 //
360 foundpos = i; 258 configMember =
361 break; 259 new ConfigurationMember(Path.Combine(Util.configDir(),
362 } 260 "estate_settings.xml"), "ESTATE SETTINGS",
261 loadConfigurationOptions,
262 handleIncomingConfiguration, true);
263
264 l_EstateManagers.Clear();
265 configMember.performConfigurationRetrieve();
363 } 266 }
364 if (foundpos < notfoundparam) 267 }
365 {
366 LLUUID[] restateManagers = new LLUUID[testateManagers.Length - 1];
367 268
368 // fill new estate managers array up to the found spot 269 public void Save()
369 for (int j = 0; j < foundpos; j++) 270 {
370 restateManagers[j] = testateManagers[j]; 271 if(OnSave != null)
272 OnSave(this);
273 }
371 274
372 // skip over the estate manager we're removing and compress 275 public void AddEstateManager(LLUUID avatarID)
373 for (int j = foundpos + 1; j < testateManagers.Length; j++) 276 {
374 restateManagers[j - 1] = testateManagers[j]; 277 if(avatarID == null || avatarID == LLUUID.Zero)
278 return;
279 if(!l_EstateManagers.Contains(avatarID))
280 l_EstateManagers.Add(avatarID);
281 }
375 282
376 estateManagers = restateManagers; 283 public void RemoveEstateManager(LLUUID avatarID)
377 } 284 {
378 else 285 if(l_EstateManagers.Contains(avatarID))
379 { 286 l_EstateManagers.Remove(avatarID);
380 m_log.Error("[ESTATESETTINGS]: Unable to locate estate manager : " + avatarID.ToString() + " for removal");
381 }
382 } 287 }
383 288
384 #endregion 289 public bool IsEstateManager(LLUUID avatarID)
290 {
291 return l_EstateManagers.Contains(avatarID);
292 }
293
294 public bool IsBanned(LLUUID avatarID)
295 {
296 foreach (EstateBan ban in l_EstateBans)
297 if(ban.bannedUUID == avatarID)
298 return true;
299 return false;
300 }
301
302 public void AddBan(EstateBan ban)
303 {
304 if(ban == null)
305 return;
306 if(!IsBanned(ban.bannedUUID))
307 l_EstateBans.Add(ban);
308 }
309
310 public void ClearBans()
311 {
312 l_EstateBans.Clear();
313 }
314
315 public void RemoveBan(LLUUID avatarID)
316 {
317 foreach (EstateBan ban in new List<EstateBan>(l_EstateBans))
318 if(ban.bannedUUID == avatarID)
319 l_EstateBans.Remove(ban);
320 }
385 321
386 public void loadConfigurationOptions() 322 public void loadConfigurationOptions()
387 { 323 {
388 configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, 324 configMember.addConfigurationOption("billable_factor",
389 "0.0", true); 325 ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
390 configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, String.Empty, "100", 326 String.Empty, "0.0", true);
391 true); 327
392 configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 328// configMember.addConfigurationOption("estate_id",
393 String.Empty, "1", true); 329// ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
394 configMember.addConfigurationOption("max_agents", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, String.Empty, "40", 330// String.Empty, "100", true);
395 true); 331
396 332// configMember.addConfigurationOption("parent_estate_id",
397 configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty, 333// ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
398 "0", true); 334// String.Empty, "1", true);
399 configMember.addConfigurationOption("redirect_grid_y", ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty, 335
400 "0", true); 336 configMember.addConfigurationOption("redirect_grid_x",
401 configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 337 ConfigurationOption.ConfigurationTypes.TYPE_INT32,
402 String.Empty, "1", true); 338 String.Empty, "0", true);
403 339
404 configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, String.Empty, 340 configMember.addConfigurationOption("redirect_grid_y",
405 "20.0", true); 341 ConfigurationOption.ConfigurationTypes.TYPE_INT32,
406 342 String.Empty, "0", true);
407 configMember.addConfigurationOption("estate_name", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 343
408 String.Empty, "TestEstate", true); 344 configMember.addConfigurationOption("price_per_meter",
409 configMember.addConfigurationOption("estate_manager_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 345 ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
410 String.Empty, "00000000-0000-0000-0000-000000000000", true); 346 String.Empty, "1", true);
411 configMember.addConfigurationOption("estate_manager_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 347
412 String.Empty, "00000000-0000-0000-0000-000000000000", true); 348 configMember.addConfigurationOption("estate_name",
413 configMember.addConfigurationOption("estate_manager_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 349 ConfigurationOption.ConfigurationTypes.TYPE_STRING,
414 String.Empty, "00000000-0000-0000-0000-000000000000", true); 350 String.Empty, "My Estate", true);
415 configMember.addConfigurationOption("estate_manager_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 351
416 String.Empty, "00000000-0000-0000-0000-000000000000", true); 352 configMember.addConfigurationOption("estate_manager_0",
417 configMember.addConfigurationOption("estate_manager_4", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 353 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
418 String.Empty, "00000000-0000-0000-0000-000000000000", true); 354 String.Empty, "00000000-0000-0000-0000-000000000000", true);
419 configMember.addConfigurationOption("estate_manager_5", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 355
420 String.Empty, "00000000-0000-0000-0000-000000000000", true); 356 configMember.addConfigurationOption("estate_manager_1",
421 configMember.addConfigurationOption("estate_manager_6", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 357 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
422 String.Empty, "00000000-0000-0000-0000-000000000000", true); 358 String.Empty, "00000000-0000-0000-0000-000000000000", true);
423 configMember.addConfigurationOption("estate_manager_7", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 359
424 String.Empty, "00000000-0000-0000-0000-000000000000", true); 360 configMember.addConfigurationOption("estate_manager_2",
425 configMember.addConfigurationOption("estate_manager_8", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 361 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
426 String.Empty, "00000000-0000-0000-0000-000000000000", true); 362 String.Empty, "00000000-0000-0000-0000-000000000000", true);
427 configMember.addConfigurationOption("estate_manager_9", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 363
428 String.Empty, "00000000-0000-0000-0000-000000000000", true); 364 configMember.addConfigurationOption("estate_manager_3",
365 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
366 String.Empty, "00000000-0000-0000-0000-000000000000", true);
367
368 configMember.addConfigurationOption("estate_manager_4",
369 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
370 String.Empty, "00000000-0000-0000-0000-000000000000", true);
371
372 configMember.addConfigurationOption("estate_manager_5",
373 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
374 String.Empty, "00000000-0000-0000-0000-000000000000", true);
375
376 configMember.addConfigurationOption("estate_manager_6",
377 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
378 String.Empty, "00000000-0000-0000-0000-000000000000", true);
379
380 configMember.addConfigurationOption("estate_manager_7",
381 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
382 String.Empty, "00000000-0000-0000-0000-000000000000", true);
383
384 configMember.addConfigurationOption("estate_manager_8",
385 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
386 String.Empty, "00000000-0000-0000-0000-000000000000", true);
387
388 configMember.addConfigurationOption("estate_manager_9",
389 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
390 String.Empty, "00000000-0000-0000-0000-000000000000", true);
391
392 configMember.addConfigurationOption("region_flags",
393 ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
394 String.Empty, "336723974", true);
429 } 395 }
430 396
431 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 397 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
432 { 398 {
433 switch (configuration_key) 399 switch (configuration_key)
434 { 400 {
435 case "billable_factor": 401 case "region_flags":
436 m_billableFactor = (float) configuration_result; 402 Simulator.RegionFlags flags = (Simulator.RegionFlags)(uint)configuration_result;
403 if((flags & (Simulator.RegionFlags)(1<<29)) != 0)
404 m_AllowVoice = true;
405 if((flags & Simulator.RegionFlags.AllowDirectTeleport) != 0)
406 m_AllowDirectTeleport = true;
407 if((flags & Simulator.RegionFlags.DenyAnonymous) != 0)
408 m_DenyAnonymous = true;
409 if((flags & Simulator.RegionFlags.DenyIdentified) != 0)
410 m_DenyIdentified = true;
411 if((flags & Simulator.RegionFlags.DenyTransacted) != 0)
412 m_DenyTransacted = true;
413 if((flags & Simulator.RegionFlags.AbuseEmailToEstateOwner) != 0)
414 m_AbuseEmailToEstateOwner = true;
415 if((flags & Simulator.RegionFlags.BlockDwell) != 0)
416 m_BlockDwell = true;
417 if((flags & Simulator.RegionFlags.EstateSkipScripts) != 0)
418 m_EstateSkipScripts = true;
419 if((flags & Simulator.RegionFlags.ResetHomeOnTeleport) != 0)
420 m_ResetHomeOnTeleport = true;
421 if((flags & Simulator.RegionFlags.TaxFree) != 0)
422 m_TaxFree = true;
423 if((flags & Simulator.RegionFlags.PublicAllowed) != 0)
424 m_PublicAccess = true;
437 break; 425 break;
438 case "estate_id": 426 case "billable_factor":
439 m_estateID = (uint) configuration_result; 427 m_BillableFactor = (float) configuration_result;
440 break;
441 case "parent_estate_id":
442 m_parentEstateID = (uint) configuration_result;
443 break; 428 break;
429// case "estate_id":
430// m_EstateID = (uint) configuration_result;
431// break;
432// case "parent_estate_id":
433// m_ParentEstateID = (uint) configuration_result;
434// break;
444 case "redirect_grid_x": 435 case "redirect_grid_x":
445 m_redirectGridX = (int) configuration_result; 436 m_RedirectGridX = (int) configuration_result;
446 break; 437 break;
447 case "redirect_grid_y": 438 case "redirect_grid_y":
448 m_redirectGridY = (int) configuration_result; 439 m_RedirectGridY = (int) configuration_result;
449 break; 440 break;
450 case "price_per_meter": 441 case "price_per_meter":
451 m_pricePerMeter = Convert.ToInt32(configuration_result); 442 m_PricePerMeter = Convert.ToInt32(configuration_result);
452 break; 443 break;
453
454 case "estate_name": 444 case "estate_name":
455 m_estateName = (string) configuration_result; 445 m_EstateName = (string) configuration_result;
456 break; 446 break;
457 case "estate_manager_0": 447 case "estate_manager_0":
458 m_estateManager0 = (LLUUID) configuration_result; 448 AddEstateManager((LLUUID)configuration_result);
459 break; 449 break;
460 case "estate_manager_1": 450 case "estate_manager_1":
461 m_estateManager1 = (LLUUID) configuration_result; 451 AddEstateManager((LLUUID)configuration_result);
462 break; 452 break;
463 case "estate_manager_2": 453 case "estate_manager_2":
464 m_estateManager2 = (LLUUID) configuration_result; 454 AddEstateManager((LLUUID)configuration_result);
465 break; 455 break;
466 case "estate_manager_3": 456 case "estate_manager_3":
467 m_estateManager3 = (LLUUID) configuration_result; 457 AddEstateManager((LLUUID)configuration_result);
468 break; 458 break;
469 case "estate_manager_4": 459 case "estate_manager_4":
470 m_estateManager4 = (LLUUID) configuration_result; 460 AddEstateManager((LLUUID)configuration_result);
471 break; 461 break;
472 case "estate_manager_5": 462 case "estate_manager_5":
473 m_estateManager5 = (LLUUID) configuration_result; 463 AddEstateManager((LLUUID)configuration_result);
474 break; 464 break;
475 case "estate_manager_6": 465 case "estate_manager_6":
476 m_estateManager6 = (LLUUID) configuration_result; 466 AddEstateManager((LLUUID)configuration_result);
477 break; 467 break;
478 case "estate_manager_7": 468 case "estate_manager_7":
479 m_estateManager7 = (LLUUID) configuration_result; 469 AddEstateManager((LLUUID)configuration_result);
480 break; 470 break;
481 case "estate_manager_8": 471 case "estate_manager_8":
482 m_estateManager8 = (LLUUID) configuration_result; 472 AddEstateManager((LLUUID)configuration_result);
483 break; 473 break;
484 case "estate_manager_9": 474 case "estate_manager_9":
485 m_estateManager9 = (LLUUID) configuration_result; 475 AddEstateManager((LLUUID)configuration_result);
486 break; 476 break;
487 } 477 }
488 478
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index f34b9c4..bb44eb9 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -285,7 +285,8 @@ namespace OpenSim.Framework
285 public delegate void SetEstateTerrainDetailTexture(IClientAPI remoteClient, int corner, LLUUID side); 285 public delegate void SetEstateTerrainDetailTexture(IClientAPI remoteClient, int corner, LLUUID side);
286 public delegate void SetEstateTerrainTextureHeights(IClientAPI remoteClient, int corner, float lowVal, float highVal); 286 public delegate void SetEstateTerrainTextureHeights(IClientAPI remoteClient, int corner, float lowVal, float highVal);
287 public delegate void CommitEstateTerrainTextureRequest(IClientAPI remoteClient); 287 public delegate void CommitEstateTerrainTextureRequest(IClientAPI remoteClient);
288 public delegate void SetRegionTerrainSettings(float waterHeight, float terrainRaiseLimit, float terrainLowerLimit, bool fixedSun, float sunHour); 288 public delegate void SetRegionTerrainSettings(float waterHeight, float terrainRaiseLimit, float terrainLowerLimit, bool estateSun, bool fixedSun, float sunHour, bool globalSun, bool estateFixed, float estateSunHour);
289 public delegate void EstateChangeInfo(IClientAPI client, LLUUID invoice, LLUUID senderID, UInt32 param1, UInt32 param2);
289 public delegate void BakeTerrain(IClientAPI remoteClient ); 290 public delegate void BakeTerrain(IClientAPI remoteClient );
290 public delegate void EstateRestartSimRequest(IClientAPI remoteClient, int secondsTilReboot); 291 public delegate void EstateRestartSimRequest(IClientAPI remoteClient, int secondsTilReboot);
291 public delegate void EstateChangeCovenantRequest(IClientAPI remoteClient, LLUUID newCovenantID); 292 public delegate void EstateChangeCovenantRequest(IClientAPI remoteClient, LLUUID newCovenantID);
@@ -349,6 +350,7 @@ namespace OpenSim.Framework
349 // [Obsolete("LLClientView Specific - Replace with more suitable arguments.")] 350 // [Obsolete("LLClientView Specific - Replace with more suitable arguments.")]
350 event ModifyTerrain OnModifyTerrain; 351 event ModifyTerrain OnModifyTerrain;
351 event BakeTerrain OnBakeTerrain; 352 event BakeTerrain OnBakeTerrain;
353 event EstateChangeInfo OnEstateChangeInfo;
352 // [Obsolete("LLClientView Specific.")] 354 // [Obsolete("LLClientView Specific.")]
353 event SetAppearance OnSetAppearance; 355 event SetAppearance OnSetAppearance;
354 // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")] 356 // [Obsolete("LLClientView Specific - Replace and rename OnAvatarUpdate. Difference from SetAppearance?")]
@@ -628,11 +630,11 @@ namespace OpenSim.Framework
628 630
629 void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID); 631 void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID);
630 632
631 void SendBannedUserList(LLUUID invoice, List<RegionBanListItem> banlist, uint estateID); 633 void SendBannedUserList(LLUUID invoice, EstateBan[] banlist, uint estateID);
632 634
633 void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args); 635 void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args);
634 void SendEstateCovenantInformation(); 636 void SendEstateCovenantInformation(LLUUID covenant);
635 void SendDetailedEstateData(LLUUID invoice,string estateName, uint estateID); 637 void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant);
636 638
637 void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags); 639 void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags);
638 void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID); 640 void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID);
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index e899947..ee64bf2 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -193,7 +193,6 @@ namespace OpenSim.Framework
193 193
194 public bool commFailTF = false; 194 public bool commFailTF = false;
195 public ConfigurationMember configMember; 195 public ConfigurationMember configMember;
196 public LLUUID CovenantID = LLUUID.Zero;
197 public string DataStore = String.Empty; 196 public string DataStore = String.Empty;
198 public bool isSandbox = false; 197 public bool isSandbox = false;
199 private EstateSettings m_estateSettings; 198 private EstateSettings m_estateSettings;
@@ -212,7 +211,6 @@ namespace OpenSim.Framework
212 211
213 public LLUUID lastMapUUID = LLUUID.Zero; 212 public LLUUID lastMapUUID = LLUUID.Zero;
214 public string lastMapRefresh = "0"; 213 public string lastMapRefresh = "0";
215 public List<RegionBanListItem> regionBanlist = new List<RegionBanListItem>();
216 214
217 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. 215 // Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
218 216
@@ -279,6 +277,8 @@ namespace OpenSim.Framework
279 277
280 return m_estateSettings; 278 return m_estateSettings;
281 } 279 }
280
281 set { m_estateSettings = value; }
282 } 282 }
283 283
284 public RegionSettings RegionSettings 284 public RegionSettings RegionSettings
@@ -364,28 +364,6 @@ namespace OpenSim.Framework
364 configMember.performConfigurationRetrieve(); 364 configMember.performConfigurationRetrieve();
365 } 365 }
366 366
367 public bool CheckIfUserBanned(LLUUID user)
368 {
369
370 RegionBanListItem[] bl = regionBanlist.ToArray();
371
372 bool banned = false;
373
374 for (int i = 0; i < bl.Length; i++)
375 {
376 if (bl[i] == null)
377 continue;
378
379 if (bl[i].bannedUUID == user)
380 {
381 banned = true;
382 break;
383 }
384 }
385
386 return banned;
387 }
388
389 public void loadConfigurationOptionsFromMe() 367 public void loadConfigurationOptionsFromMe()
390 { 368 {
391 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE, 369 configMember.addConfigurationOption("sim_UUID", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID_NULL_FREE,
@@ -415,9 +393,6 @@ namespace OpenSim.Framework
415 "External Host Name", m_externalHostName, true); 393 "External Host Name", m_externalHostName, true);
416 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 394 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
417 "Master Avatar UUID", MasterAvatarAssignedUUID.ToString(), true); 395 "Master Avatar UUID", MasterAvatarAssignedUUID.ToString(), true);
418 configMember.addConfigurationOption("estate_covanant_uuid",
419 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant",
420 CovenantID.ToString(), true);
421 configMember.addConfigurationOption("master_avatar_first", 396 configMember.addConfigurationOption("master_avatar_first",
422 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 397 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
423 "First Name of Master Avatar", MasterAvatarFirstName, true); 398 "First Name of Master Avatar", MasterAvatarFirstName, true);
@@ -461,9 +436,6 @@ namespace OpenSim.Framework
461 "External Host Name", "127.0.0.1", false); 436 "External Host Name", "127.0.0.1", false);
462 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 437 configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
463 "Master Avatar UUID", LLUUID.Zero.ToString(), true); 438 "Master Avatar UUID", LLUUID.Zero.ToString(), true);
464 configMember.addConfigurationOption("estate_covanant_uuid",
465 ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "Estate Covenant",
466 LLUUID.Zero.ToString(), true);
467 configMember.addConfigurationOption("master_avatar_first", 439 configMember.addConfigurationOption("master_avatar_first",
468 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 440 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
469 "First Name of Master Avatar", "Test", false, 441 "First Name of Master Avatar", "Test", false,
@@ -538,10 +510,6 @@ namespace OpenSim.Framework
538 case "master_avatar_uuid": 510 case "master_avatar_uuid":
539 MasterAvatarAssignedUUID = (LLUUID) configuration_result; 511 MasterAvatarAssignedUUID = (LLUUID) configuration_result;
540 break; 512 break;
541 case "estate_covanant_uuid":
542 CovenantID = (LLUUID) configuration_result;
543 break;
544
545 case "master_avatar_first": 513 case "master_avatar_first":
546 MasterAvatarFirstName = (string) configuration_result; 514 MasterAvatarFirstName = (string) configuration_result;
547 break; 515 break;
@@ -563,11 +531,6 @@ namespace OpenSim.Framework
563 return true; 531 return true;
564 } 532 }
565 533
566 public void SaveEstatecovenantUUID(LLUUID notecard)
567 {
568 if (null == configMember) return;
569 configMember.forceSetConfigurationOption("estate_covanant_uuid", notecard.ToString());
570 }
571 public void SaveLastMapUUID(LLUUID mapUUID) 534 public void SaveLastMapUUID(LLUUID mapUUID)
572 { 535 {
573 if (null == configMember) return; 536 if (null == configMember) return;
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index be57c1b..13fabaf 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -162,6 +162,8 @@ namespace OpenSim.Framework
162 (flags & Simulator.RegionFlags.SkipPhysics) != 0; 162 (flags & Simulator.RegionFlags.SkipPhysics) != 0;
163 m_FixedSun = 163 m_FixedSun =
164 (flags & Simulator.RegionFlags.SunFixed) != 0; 164 (flags & Simulator.RegionFlags.SunFixed) != 0;
165 m_Sandbox =
166 (flags & Simulator.RegionFlags.Sandbox) != 0;
165 break; 167 break;
166 case "max_agents": 168 case "max_agents":
167 m_AgentLimit = (int)value; 169 m_AgentLimit = (int)value;
@@ -231,7 +233,8 @@ namespace OpenSim.Framework
231 233
232 public void Save() 234 public void Save()
233 { 235 {
234 OnSave(this); 236 if(OnSave != null)
237 OnSave(this);
235 } 238 }
236 239
237 private LLUUID m_RegionUUID = LLUUID.Zero; 240 private LLUUID m_RegionUUID = LLUUID.Zero;
@@ -474,6 +477,14 @@ namespace OpenSim.Framework
474 set { m_UseEstateSun = value; } 477 set { m_UseEstateSun = value; }
475 } 478 }
476 479
480 private bool m_Sandbox = false;
481
482 public bool Sandbox
483 {
484 get { return m_Sandbox; }
485 set { m_Sandbox = value; }
486 }
487
477 private LLVector3 m_SunVector; 488 private LLVector3 m_SunVector;
478 489
479 public LLVector3 SunVector 490 public LLVector3 SunVector