mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
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
This commit is contained in:
@@ -83,7 +83,7 @@ namespace OpenSim.Data.MSSQL
|
||||
/// </summary>
|
||||
/// <param name="regionID">region ID.</param>
|
||||
/// <returns></returns>
|
||||
public EstateSettings LoadEstateSettings(UUID regionID)
|
||||
public EstateSettings LoadEstateSettings(UUID regionID, bool create)
|
||||
{
|
||||
EstateSettings es = new EstateSettings();
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace OpenSim.Data.MSSQL
|
||||
}
|
||||
|
||||
|
||||
if (insertEstate)
|
||||
if (insertEstate && create)
|
||||
{
|
||||
List<string> names = new List<string>(FieldList);
|
||||
|
||||
@@ -173,25 +173,6 @@ namespace OpenSim.Data.MSSQL
|
||||
}
|
||||
}
|
||||
|
||||
// Munge and transfer the ban list
|
||||
|
||||
sql = string.Format("insert into estateban select {0}, bannedUUID, bannedIp, bannedIpHostMask, '' from regionban where regionban.regionUUID = @UUID", es.EstateID);
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@UUID", regionID));
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Log.Debug("[ESTATE DB]: Error setting up estateban from regionban");
|
||||
}
|
||||
}
|
||||
|
||||
//TODO check if this is needed??
|
||||
es.Save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user