- adding a Persistent flag to RegionInfo

- adding  EstateSettings.Save() to RemoteAdmin ACL code (invoked only when region is persistent)
trunk
Dr Scofield 2009-07-03 15:36:47 +00:00
parent 8344df886b
commit 840f5f9485
2 changed files with 15 additions and 1 deletions

View File

@ -615,6 +615,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.DebugFormat("[RADMIN] CreateRegion: persisting region {0} to {1}",
region.RegionID, regionXmlPath);
region.SaveRegionToFile("dynamic region", regionXmlPath);
}
else
{
region.Persistent = false;
}
// Create the region and perform any initial initialization
@ -785,7 +789,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// Modify access
scene.RegionInfo.EstateSettings.PublicAccess =
getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess);
scene.RegionInfo.EstateSettings.Save();
if (scene.RegionInfo.Persistent)
scene.RegionInfo.EstateSettings.Save();
if (requestData.ContainsKey("enable_voice"))
{
@ -2197,6 +2202,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Scene s = m_app.SceneManager.CurrentScene;
s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{};
if (s.RegionInfo.Persistent)
s.RegionInfo.EstateSettings.Save();
}
catch (Exception e)
@ -2278,6 +2285,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
}
s.RegionInfo.EstateSettings.EstateAccess = acl.ToArray();
if (s.RegionInfo.Persistent)
s.RegionInfo.EstateSettings.Save();
}
responseData["added"] = addk;
@ -2361,6 +2370,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
}
s.RegionInfo.EstateSettings.EstateAccess = acl.ToArray();
if (s.RegionInfo.Persistent)
s.RegionInfo.EstateSettings.Save();
}
responseData["removed"] = remk;

View File

@ -209,6 +209,8 @@ namespace OpenSim.Framework
public string DataStore = String.Empty;
public string RegionFile = String.Empty;
public bool isSandbox = false;
public bool Persistent = true;
private EstateSettings m_estateSettings;
private RegionSettings m_regionSettings;
// private IConfigSource m_configSource = null;
@ -233,6 +235,7 @@ namespace OpenSim.Framework
private bool m_clampPrimSize = false;
private int m_objectCapacity = 0;
// Apparently, we're applying the same estatesettings regardless of whether it's local or remote.
// MT: Yes. Estates can't span trust boundaries. Therefore, it can be