aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs3
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs3
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs6
4 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index 17cd6a1..c0395a9 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -158,6 +158,7 @@ namespace OpenSim.Data.MySQL
158 public EstateSettings LoadEstateSettings(LLUUID regionID) 158 public EstateSettings LoadEstateSettings(LLUUID regionID)
159 { 159 {
160 EstateSettings es = new EstateSettings(); 160 EstateSettings es = new EstateSettings();
161 es.OnSave += StoreEstateSettings;
161 162
162 string sql = "select estate_settings."+String.Join(",estate_settings.", FieldList)+" from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = ?RegionID"; 163 string sql = "select estate_settings."+String.Join(",estate_settings.", FieldList)+" from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = ?RegionID";
163 164
@@ -258,6 +259,8 @@ namespace OpenSim.Data.MySQL
258 catch (Exception) 259 catch (Exception)
259 { 260 {
260 } 261 }
262
263 es.Save();
261 } 264 }
262 265
263 LoadBanList(es); 266 LoadBanList(es);
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index a8dfb4e..dd6145c 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -86,6 +86,7 @@ namespace OpenSim.Data.SQLite
86 public EstateSettings LoadEstateSettings(LLUUID regionID) 86 public EstateSettings LoadEstateSettings(LLUUID regionID)
87 { 87 {
88 EstateSettings es = new EstateSettings(); 88 EstateSettings es = new EstateSettings();
89 es.OnSave += StoreEstateSettings;
89 90
90 string sql = "select estate_settings."+String.Join(",estate_settings.", FieldList)+" from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = @RegionID"; 91 string sql = "select estate_settings."+String.Join(",estate_settings.", FieldList)+" from estate_map left join estate_settings on estate_map.EstateID = estate_settings.EstateID where estate_settings.EstateID is not null and RegionID = @RegionID";
91 92
@@ -184,6 +185,8 @@ namespace OpenSim.Data.SQLite
184 catch (Exception) 185 catch (Exception)
185 { 186 {
186 } 187 }
188
189 es.Save();
187 } 190 }
188 191
189 LoadBanList(es); 192 LoadBanList(es);
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index f2b6ae0..ab0adf2 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -245,7 +245,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
245 ScenePresence s = m_scene.GetScenePresence(user); 245 ScenePresence s = m_scene.GetScenePresence(user);
246 if (s != null) 246 if (s != null)
247 { 247 {
248 m_scene.TeleportClientHome(user, s.ControllingClient); 248 if(!s.IsChildAgent)
249 m_scene.TeleportClientHome(user, s.ControllingClient);
249 } 250 }
250 251
251 } 252 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index bbb028d..aed104e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -269,15 +269,9 @@ namespace OpenSim.Region.Environment.Scenes
269 m_externalChecks = new SceneExternalChecks(this); 269 m_externalChecks = new SceneExternalChecks(this);
270 270
271 // Load region settings 271 // Load region settings
272 // First try database
273 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 272 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
274 // Hook up save event
275 m_regInfo.RegionSettings.OnSave += m_storageManager.DataStore.StoreRegionSettings;
276 if(m_storageManager.EstateDataStore != null) 273 if(m_storageManager.EstateDataStore != null)
277 {
278 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID); 274 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
279 m_regInfo.EstateSettings.OnSave += m_storageManager.EstateDataStore.StoreEstateSettings;
280 }
281 275
282 276
283 277