Patch to fix saving of estate managers list loaded during migration.

No longer teleports an agent home unless their root agent is being banned.
Visual blocking is still in effect.
0.6.0-stable
Melanie Thielker 2008-07-18 19:32:05 +00:00
parent 6a7d544497
commit bbd076544d
4 changed files with 8 additions and 7 deletions

View File

@ -158,6 +158,7 @@ namespace OpenSim.Data.MySQL
public EstateSettings LoadEstateSettings(LLUUID regionID)
{
EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings;
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";
@ -258,6 +259,8 @@ namespace OpenSim.Data.MySQL
catch (Exception)
{
}
es.Save();
}
LoadBanList(es);

View File

@ -86,6 +86,7 @@ namespace OpenSim.Data.SQLite
public EstateSettings LoadEstateSettings(LLUUID regionID)
{
EstateSettings es = new EstateSettings();
es.OnSave += StoreEstateSettings;
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";
@ -184,6 +185,8 @@ namespace OpenSim.Data.SQLite
catch (Exception)
{
}
es.Save();
}
LoadBanList(es);

View File

@ -245,7 +245,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
ScenePresence s = m_scene.GetScenePresence(user);
if (s != null)
{
m_scene.TeleportClientHome(user, s.ControllingClient);
if(!s.IsChildAgent)
m_scene.TeleportClientHome(user, s.ControllingClient);
}
}

View File

@ -269,15 +269,9 @@ namespace OpenSim.Region.Environment.Scenes
m_externalChecks = new SceneExternalChecks(this);
// Load region settings
// First try database
m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
// Hook up save event
m_regInfo.RegionSettings.OnSave += m_storageManager.DataStore.StoreRegionSettings;
if(m_storageManager.EstateDataStore != null)
{
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
m_regInfo.EstateSettings.OnSave += m_storageManager.EstateDataStore.StoreEstateSettings;
}