aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-03-22 18:49:56 +0000
committerMelanie2010-03-22 18:49:56 +0000
commit70b0e07d1ea99f8bd88f2be12bf9b53a39187f60 (patch)
tree0093de7003392ff5edd246e82fa3fcb2b216cff1 /OpenSim
parentFix a nullref in permissions when returning objects via right-click (diff)
downloadopensim-SC_OLD-70b0e07d1ea99f8bd88f2be12bf9b53a39187f60.zip
opensim-SC_OLD-70b0e07d1ea99f8bd88f2be12bf9b53a39187f60.tar.gz
opensim-SC_OLD-70b0e07d1ea99f8bd88f2be12bf9b53a39187f60.tar.bz2
opensim-SC_OLD-70b0e07d1ea99f8bd88f2be12bf9b53a39187f60.tar.xz
Remove the reading of estate_settings.xml and the associated processing of
defaults. Adding code to facilitate estate creation / managemment as part of first time start up
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLEstateData.cs23
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs18
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs20
-rw-r--r--OpenSim/Data/Tests/BasicEstateTest.cs24
-rw-r--r--OpenSim/Framework/EstateSettings.cs194
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
7 files changed, 30 insertions, 253 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
index 6f6f076..1624f56 100644
--- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
@@ -83,7 +83,7 @@ namespace OpenSim.Data.MSSQL
83 /// </summary> 83 /// </summary>
84 /// <param name="regionID">region ID.</param> 84 /// <param name="regionID">region ID.</param>
85 /// <returns></returns> 85 /// <returns></returns>
86 public EstateSettings LoadEstateSettings(UUID regionID) 86 public EstateSettings LoadEstateSettings(UUID regionID, bool create)
87 { 87 {
88 EstateSettings es = new EstateSettings(); 88 EstateSettings es = new EstateSettings();
89 89
@@ -127,7 +127,7 @@ namespace OpenSim.Data.MSSQL
127 } 127 }
128 128
129 129
130 if (insertEstate) 130 if (insertEstate && create)
131 { 131 {
132 List<string> names = new List<string>(FieldList); 132 List<string> names = new List<string>(FieldList);
133 133
@@ -173,25 +173,6 @@ namespace OpenSim.Data.MSSQL
173 } 173 }
174 } 174 }
175 175
176 // Munge and transfer the ban list
177
178 sql = string.Format("insert into estateban select {0}, bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = @UUID", es.EstateID);
179 using (SqlConnection conn = new SqlConnection(m_connectionString))
180 using (SqlCommand cmd = new SqlCommand(sql, conn))
181 {
182
183 cmd.Parameters.Add(_Database.CreateParameter("@UUID", regionID));
184 try
185 {
186 conn.Open();
187 cmd.ExecuteNonQuery();
188 }
189 catch (Exception)
190 {
191 _Log.Debug("[ESTATE DB]: Error setting up estateban from regionban");
192 }
193 }
194
195 //TODO check if this is needed?? 176 //TODO check if this is needed??
196 es.Save(); 177 es.Save();
197 } 178 }
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index 2eae2d8..e94dcda 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Data.MySQL
121 } 121 }
122 } 122 }
123 123
124 public EstateSettings LoadEstateSettings(UUID regionID) 124 public EstateSettings LoadEstateSettings(UUID regionID, bool create)
125 { 125 {
126 EstateSettings es = new EstateSettings(); 126 EstateSettings es = new EstateSettings();
127 es.OnSave += StoreEstateSettings; 127 es.OnSave += StoreEstateSettings;
@@ -129,12 +129,12 @@ namespace OpenSim.Data.MySQL
129 string sql = "select estate_settings." + String.Join(",estate_settings.", FieldList) + 129 string sql = "select estate_settings." + String.Join(",estate_settings.", FieldList) +
130 " from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = ?RegionID"; 130 " from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = ?RegionID";
131 131
132 bool migration = true;
133
134 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 132 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
135 { 133 {
136 dbcon.Open(); 134 dbcon.Open();
137 135
136 bool found = false;
137
138 using (MySqlCommand cmd = dbcon.CreateCommand()) 138 using (MySqlCommand cmd = dbcon.CreateCommand())
139 { 139 {
140 cmd.CommandText = sql; 140 cmd.CommandText = sql;
@@ -144,7 +144,7 @@ namespace OpenSim.Data.MySQL
144 { 144 {
145 if (r.Read()) 145 if (r.Read())
146 { 146 {
147 migration = false; 147 found = true;
148 148
149 foreach (string name in FieldList) 149 foreach (string name in FieldList)
150 { 150 {
@@ -172,7 +172,7 @@ namespace OpenSim.Data.MySQL
172 } 172 }
173 } 173 }
174 174
175 if (migration) 175 if (!found && create)
176 { 176 {
177 // Migration case 177 // Migration case
178 List<string> names = new List<string>(FieldList); 178 List<string> names = new List<string>(FieldList);
@@ -220,14 +220,6 @@ namespace OpenSim.Data.MySQL
220 try { cmd.ExecuteNonQuery(); } 220 try { cmd.ExecuteNonQuery(); }
221 catch (Exception) { } 221 catch (Exception) { }
222 222
223 // Munge and transfer the ban list
224 cmd.Parameters.Clear();
225 cmd.CommandText = "insert into estateban select " + es.EstateID.ToString() + ", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = ?UUID";
226 cmd.Parameters.AddWithValue("?UUID", regionID.ToString());
227
228 try { cmd.ExecuteNonQuery(); }
229 catch (Exception) { }
230
231 es.Save(); 223 es.Save();
232 } 224 }
233 } 225 }
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index 1be99ee..4a447d2 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Data.SQLite
80 get { return new List<string>(m_FieldMap.Keys).ToArray(); } 80 get { return new List<string>(m_FieldMap.Keys).ToArray(); }
81 } 81 }
82 82
83 public EstateSettings LoadEstateSettings(UUID regionID) 83 public EstateSettings LoadEstateSettings(UUID regionID, bool create)
84 { 84 {
85 EstateSettings es = new EstateSettings(); 85 EstateSettings es = new EstateSettings();
86 es.OnSave += StoreEstateSettings; 86 es.OnSave += StoreEstateSettings;
@@ -120,10 +120,8 @@ namespace OpenSim.Data.SQLite
120 } 120 }
121 r.Close(); 121 r.Close();
122 } 122 }
123 else 123 else if (create)
124 { 124 {
125 // Migration case
126 //
127 r.Close(); 125 r.Close();
128 126
129 List<string> names = new List<string>(FieldList); 127 List<string> names = new List<string>(FieldList);
@@ -176,20 +174,6 @@ namespace OpenSim.Data.SQLite
176 { 174 {
177 } 175 }
178 176
179 // Munge and transfer the ban list
180 //
181 cmd.Parameters.Clear();
182 cmd.CommandText = "insert into estateban select "+es.EstateID.ToString()+", bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = :UUID";
183 cmd.Parameters.Add(":UUID", regionID.ToString());
184
185 try
186 {
187 cmd.ExecuteNonQuery();
188 }
189 catch (Exception)
190 {
191 }
192
193 es.Save(); 177 es.Save();
194 } 178 }
195 179
diff --git a/OpenSim/Data/Tests/BasicEstateTest.cs b/OpenSim/Data/Tests/BasicEstateTest.cs
index 907bb38..d14d405 100644
--- a/OpenSim/Data/Tests/BasicEstateTest.cs
+++ b/OpenSim/Data/Tests/BasicEstateTest.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Data.Tests
158 public void T012_EstateSettingsRandomStorage() 158 public void T012_EstateSettingsRandomStorage()
159 { 159 {
160 // Letting estate store generate rows to database for us 160 // Letting estate store generate rows to database for us
161 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); 161 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
162 new PropertyScrambler<EstateSettings>() 162 new PropertyScrambler<EstateSettings>()
163 .DontScramble(x=>x.EstateID) 163 .DontScramble(x=>x.EstateID)
164 .Scramble(originalSettings); 164 .Scramble(originalSettings);
@@ -167,7 +167,7 @@ namespace OpenSim.Data.Tests
167 db.StoreEstateSettings(originalSettings); 167 db.StoreEstateSettings(originalSettings);
168 168
169 // Loading settings to another instance variable. 169 // Loading settings to another instance variable.
170 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID); 170 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID, true);
171 171
172 // Checking that loaded values are correct. 172 // Checking that loaded values are correct.
173 Assert.That(loadedSettings, Constraints.PropertyCompareConstraint(originalSettings)); 173 Assert.That(loadedSettings, Constraints.PropertyCompareConstraint(originalSettings));
@@ -177,7 +177,7 @@ namespace OpenSim.Data.Tests
177 public void T020_EstateSettingsManagerList() 177 public void T020_EstateSettingsManagerList()
178 { 178 {
179 // Letting estate store generate rows to database for us 179 // Letting estate store generate rows to database for us
180 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); 180 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
181 181
182 originalSettings.EstateManagers = new UUID[] { MANAGER_ID_1, MANAGER_ID_2 }; 182 originalSettings.EstateManagers = new UUID[] { MANAGER_ID_1, MANAGER_ID_2 };
183 183
@@ -185,7 +185,7 @@ namespace OpenSim.Data.Tests
185 db.StoreEstateSettings(originalSettings); 185 db.StoreEstateSettings(originalSettings);
186 186
187 // Loading settings to another instance variable. 187 // Loading settings to another instance variable.
188 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID); 188 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID, true);
189 189
190 Assert.AreEqual(2, loadedSettings.EstateManagers.Length); 190 Assert.AreEqual(2, loadedSettings.EstateManagers.Length);
191 Assert.AreEqual(MANAGER_ID_1, loadedSettings.EstateManagers[0]); 191 Assert.AreEqual(MANAGER_ID_1, loadedSettings.EstateManagers[0]);
@@ -196,7 +196,7 @@ namespace OpenSim.Data.Tests
196 public void T021_EstateSettingsUserList() 196 public void T021_EstateSettingsUserList()
197 { 197 {
198 // Letting estate store generate rows to database for us 198 // Letting estate store generate rows to database for us
199 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); 199 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
200 200
201 originalSettings.EstateAccess = new UUID[] { USER_ID_1, USER_ID_2 }; 201 originalSettings.EstateAccess = new UUID[] { USER_ID_1, USER_ID_2 };
202 202
@@ -204,7 +204,7 @@ namespace OpenSim.Data.Tests
204 db.StoreEstateSettings(originalSettings); 204 db.StoreEstateSettings(originalSettings);
205 205
206 // Loading settings to another instance variable. 206 // Loading settings to another instance variable.
207 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID); 207 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID, true);
208 208
209 Assert.AreEqual(2, loadedSettings.EstateAccess.Length); 209 Assert.AreEqual(2, loadedSettings.EstateAccess.Length);
210 Assert.AreEqual(USER_ID_1, loadedSettings.EstateAccess[0]); 210 Assert.AreEqual(USER_ID_1, loadedSettings.EstateAccess[0]);
@@ -215,7 +215,7 @@ namespace OpenSim.Data.Tests
215 public void T022_EstateSettingsGroupList() 215 public void T022_EstateSettingsGroupList()
216 { 216 {
217 // Letting estate store generate rows to database for us 217 // Letting estate store generate rows to database for us
218 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); 218 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
219 219
220 originalSettings.EstateGroups = new UUID[] { GROUP_ID_1, GROUP_ID_2 }; 220 originalSettings.EstateGroups = new UUID[] { GROUP_ID_1, GROUP_ID_2 };
221 221
@@ -223,7 +223,7 @@ namespace OpenSim.Data.Tests
223 db.StoreEstateSettings(originalSettings); 223 db.StoreEstateSettings(originalSettings);
224 224
225 // Loading settings to another instance variable. 225 // Loading settings to another instance variable.
226 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID); 226 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID, true);
227 227
228 Assert.AreEqual(2, loadedSettings.EstateAccess.Length); 228 Assert.AreEqual(2, loadedSettings.EstateAccess.Length);
229 Assert.AreEqual(GROUP_ID_1, loadedSettings.EstateGroups[0]); 229 Assert.AreEqual(GROUP_ID_1, loadedSettings.EstateGroups[0]);
@@ -234,7 +234,7 @@ namespace OpenSim.Data.Tests
234 public void T022_EstateSettingsBanList() 234 public void T022_EstateSettingsBanList()
235 { 235 {
236 // Letting estate store generate rows to database for us 236 // Letting estate store generate rows to database for us
237 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); 237 EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);
238 238
239 EstateBan estateBan1 = new EstateBan(); 239 EstateBan estateBan1 = new EstateBan();
240 estateBan1.BannedUserID = DataTestUtil.UUID_MIN; 240 estateBan1.BannedUserID = DataTestUtil.UUID_MIN;
@@ -248,7 +248,7 @@ namespace OpenSim.Data.Tests
248 db.StoreEstateSettings(originalSettings); 248 db.StoreEstateSettings(originalSettings);
249 249
250 // Loading settings to another instance variable. 250 // Loading settings to another instance variable.
251 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID); 251 EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID, true);
252 252
253 Assert.AreEqual(2, loadedSettings.EstateBans.Length); 253 Assert.AreEqual(2, loadedSettings.EstateBans.Length);
254 Assert.AreEqual(DataTestUtil.UUID_MIN, loadedSettings.EstateBans[0].BannedUserID); 254 Assert.AreEqual(DataTestUtil.UUID_MIN, loadedSettings.EstateBans[0].BannedUserID);
@@ -290,7 +290,7 @@ namespace OpenSim.Data.Tests
290 { 290 {
291 291
292 // Letting estate store generate rows to database for us 292 // Letting estate store generate rows to database for us
293 EstateSettings originalSettings = db.LoadEstateSettings(regionId); 293 EstateSettings originalSettings = db.LoadEstateSettings(regionId, true);
294 294
295 SetEstateSettings( 295 SetEstateSettings(
296 originalSettings, 296 originalSettings,
@@ -347,7 +347,7 @@ namespace OpenSim.Data.Tests
347 db.StoreEstateSettings(originalSettings); 347 db.StoreEstateSettings(originalSettings);
348 348
349 // Loading settings to another instance variable. 349 // Loading settings to another instance variable.
350 EstateSettings loadedSettings = db.LoadEstateSettings(regionId); 350 EstateSettings loadedSettings = db.LoadEstateSettings(regionId, true);
351 351
352 // Checking that loaded values are correct. 352 // Checking that loaded values are correct.
353 ValidateEstateSettings( 353 ValidateEstateSettings(
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index b4b5808..2a495b0 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -35,7 +35,6 @@ namespace OpenSim.Framework
35 public class EstateSettings 35 public class EstateSettings
36 { 36 {
37 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 37 // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
38 private readonly ConfigurationMember configMember;
39 38
40 public delegate void SaveDelegate(EstateSettings rs); 39 public delegate void SaveDelegate(EstateSettings rs);
41 40
@@ -43,7 +42,7 @@ namespace OpenSim.Framework
43 42
44 // Only the client uses these 43 // Only the client uses these
45 // 44 //
46 private uint m_EstateID = 100; 45 private uint m_EstateID = 0;
47 46
48 public uint EstateID 47 public uint EstateID
49 { 48 {
@@ -51,7 +50,7 @@ namespace OpenSim.Framework
51 set { m_EstateID = value; } 50 set { m_EstateID = value; }
52 } 51 }
53 52
54 private string m_EstateName; 53 private string m_EstateName = "My Estate";
55 54
56 public string EstateName 55 public string EstateName
57 { 56 {
@@ -59,7 +58,7 @@ namespace OpenSim.Framework
59 set { m_EstateName = value; } 58 set { m_EstateName = value; }
60 } 59 }
61 60
62 private uint m_ParentEstateID = 100; 61 private uint m_ParentEstateID = 1;
63 62
64 public uint ParentEstateID 63 public uint ParentEstateID
65 { 64 {
@@ -67,7 +66,7 @@ namespace OpenSim.Framework
67 set { m_ParentEstateID = value; } 66 set { m_ParentEstateID = value; }
68 } 67 }
69 68
70 private float m_BillableFactor; 69 private float m_BillableFactor = 0.0f;
71 70
72 public float BillableFactor 71 public float BillableFactor
73 { 72 {
@@ -75,7 +74,7 @@ namespace OpenSim.Framework
75 set { m_BillableFactor = value; } 74 set { m_BillableFactor = value; }
76 } 75 }
77 76
78 private int m_PricePerMeter; 77 private int m_PricePerMeter = 1;
79 78
80 public int PricePerMeter 79 public int PricePerMeter
81 { 80 {
@@ -83,7 +82,7 @@ namespace OpenSim.Framework
83 set { m_PricePerMeter = value; } 82 set { m_PricePerMeter = value; }
84 } 83 }
85 84
86 private int m_RedirectGridX; 85 private int m_RedirectGridX = 0;
87 86
88 public int RedirectGridX 87 public int RedirectGridX
89 { 88 {
@@ -91,7 +90,7 @@ namespace OpenSim.Framework
91 set { m_RedirectGridX = value; } 90 set { m_RedirectGridX = value; }
92 } 91 }
93 92
94 private int m_RedirectGridY; 93 private int m_RedirectGridY = 0;
95 94
96 public int RedirectGridY 95 public int RedirectGridY
97 { 96 {
@@ -273,25 +272,6 @@ namespace OpenSim.Framework
273 272
274 public EstateSettings() 273 public EstateSettings()
275 { 274 {
276 if (configMember == null)
277 {
278 try
279 {
280 // Load legacy defaults
281 //
282 configMember =
283 new ConfigurationMember(Path.Combine(Util.configDir(),
284 "estate_settings.xml"), "ESTATE SETTINGS",
285 loadConfigurationOptions,
286 handleIncomingConfiguration, true);
287
288 l_EstateManagers.Clear();
289 configMember.performConfigurationRetrieve();
290 }
291 catch (Exception)
292 {
293 }
294 }
295 } 275 }
296 276
297 public void Save() 277 public void Save()
@@ -393,165 +373,5 @@ namespace OpenSim.Framework
393 373
394 return l_EstateAccess.Contains(user); 374 return l_EstateAccess.Contains(user);
395 } 375 }
396
397 public void loadConfigurationOptions()
398 {
399 configMember.addConfigurationOption("billable_factor",
400 ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
401 String.Empty, "0.0", true);
402
403// configMember.addConfigurationOption("estate_id",
404// ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
405// String.Empty, "100", true);
406
407// configMember.addConfigurationOption("parent_estate_id",
408// ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
409// String.Empty, "1", true);
410
411 configMember.addConfigurationOption("redirect_grid_x",
412 ConfigurationOption.ConfigurationTypes.TYPE_INT32,
413 String.Empty, "0", true);
414
415 configMember.addConfigurationOption("redirect_grid_y",
416 ConfigurationOption.ConfigurationTypes.TYPE_INT32,
417 String.Empty, "0", true);
418
419 configMember.addConfigurationOption("price_per_meter",
420 ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
421 String.Empty, "1", true);
422
423 configMember.addConfigurationOption("estate_name",
424 ConfigurationOption.ConfigurationTypes.TYPE_STRING,
425 String.Empty, "My Estate", true);
426
427 configMember.addConfigurationOption("estate_manager_0",
428 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
429 String.Empty, "00000000-0000-0000-0000-000000000000", true);
430
431 configMember.addConfigurationOption("estate_manager_1",
432 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
433 String.Empty, "00000000-0000-0000-0000-000000000000", true);
434
435 configMember.addConfigurationOption("estate_manager_2",
436 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
437 String.Empty, "00000000-0000-0000-0000-000000000000", true);
438
439 configMember.addConfigurationOption("estate_manager_3",
440 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
441 String.Empty, "00000000-0000-0000-0000-000000000000", true);
442
443 configMember.addConfigurationOption("estate_manager_4",
444 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
445 String.Empty, "00000000-0000-0000-0000-000000000000", true);
446
447 configMember.addConfigurationOption("estate_manager_5",
448 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
449 String.Empty, "00000000-0000-0000-0000-000000000000", true);
450
451 configMember.addConfigurationOption("estate_manager_6",
452 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
453 String.Empty, "00000000-0000-0000-0000-000000000000", true);
454
455 configMember.addConfigurationOption("estate_manager_7",
456 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
457 String.Empty, "00000000-0000-0000-0000-000000000000", true);
458
459 configMember.addConfigurationOption("estate_manager_8",
460 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
461 String.Empty, "00000000-0000-0000-0000-000000000000", true);
462
463 configMember.addConfigurationOption("estate_manager_9",
464 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
465 String.Empty, "00000000-0000-0000-0000-000000000000", true);
466
467 configMember.addConfigurationOption("region_flags",
468 ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
469 String.Empty, "336723974", true);
470 }
471
472 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
473 {
474 switch (configuration_key)
475 {
476 case "region_flags":
477 RegionFlags flags = (RegionFlags)(uint)configuration_result;
478 if ((flags & (RegionFlags)(1<<29)) != 0)
479 m_AllowVoice = true;
480 if ((flags & RegionFlags.AllowDirectTeleport) != 0)
481 m_AllowDirectTeleport = true;
482 if ((flags & RegionFlags.DenyAnonymous) != 0)
483 m_DenyAnonymous = true;
484 if ((flags & RegionFlags.DenyIdentified) != 0)
485 m_DenyIdentified = true;
486 if ((flags & RegionFlags.DenyTransacted) != 0)
487 m_DenyTransacted = true;
488 if ((flags & RegionFlags.AbuseEmailToEstateOwner) != 0)
489 m_AbuseEmailToEstateOwner = true;
490 if ((flags & RegionFlags.BlockDwell) != 0)
491 m_BlockDwell = true;
492 if ((flags & RegionFlags.EstateSkipScripts) != 0)
493 m_EstateSkipScripts = true;
494 if ((flags & RegionFlags.ResetHomeOnTeleport) != 0)
495 m_ResetHomeOnTeleport = true;
496 if ((flags & RegionFlags.TaxFree) != 0)
497 m_TaxFree = true;
498 if ((flags & RegionFlags.PublicAllowed) != 0)
499 m_PublicAccess = true;
500 break;
501 case "billable_factor":
502 m_BillableFactor = (float) configuration_result;
503 break;
504// case "estate_id":
505// m_EstateID = (uint) configuration_result;
506// break;
507// case "parent_estate_id":
508// m_ParentEstateID = (uint) configuration_result;
509// break;
510 case "redirect_grid_x":
511 m_RedirectGridX = (int) configuration_result;
512 break;
513 case "redirect_grid_y":
514 m_RedirectGridY = (int) configuration_result;
515 break;
516 case "price_per_meter":
517 m_PricePerMeter = Convert.ToInt32(configuration_result);
518 break;
519 case "estate_name":
520 m_EstateName = (string) configuration_result;
521 break;
522 case "estate_manager_0":
523 AddEstateManager((UUID)configuration_result);
524 break;
525 case "estate_manager_1":
526 AddEstateManager((UUID)configuration_result);
527 break;
528 case "estate_manager_2":
529 AddEstateManager((UUID)configuration_result);
530 break;
531 case "estate_manager_3":
532 AddEstateManager((UUID)configuration_result);
533 break;
534 case "estate_manager_4":
535 AddEstateManager((UUID)configuration_result);
536 break;
537 case "estate_manager_5":
538 AddEstateManager((UUID)configuration_result);
539 break;
540 case "estate_manager_6":
541 AddEstateManager((UUID)configuration_result);
542 break;
543 case "estate_manager_7":
544 AddEstateManager((UUID)configuration_result);
545 break;
546 case "estate_manager_8":
547 AddEstateManager((UUID)configuration_result);
548 break;
549 case "estate_manager_9":
550 AddEstateManager((UUID)configuration_result);
551 break;
552 }
553
554 return true;
555 }
556 } 376 }
557} 377}
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs
index 668ff98..6861544 100644
--- a/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEstateDataStore.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Framework.Interfaces
34 { 34 {
35 void Initialise(string connectstring); 35 void Initialise(string connectstring);
36 36
37 EstateSettings LoadEstateSettings(UUID regionID); 37 EstateSettings LoadEstateSettings(UUID regionID, bool create);
38 void StoreEstateSettings(EstateSettings es); 38 void StoreEstateSettings(EstateSettings es);
39 } 39 }
40} 40}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2080687..078cf03 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -604,7 +604,7 @@ namespace OpenSim.Region.Framework.Scenes
604 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 604 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
605 if (m_storageManager.EstateDataStore != null) 605 if (m_storageManager.EstateDataStore != null)
606 { 606 {
607 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); 607 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, true);
608 } 608 }
609 609
610 //Bind Storage Manager functions to some land manager functions for this scene 610 //Bind Storage Manager functions to some land manager functions for this scene