aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLEstateData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/MSSQLEstateData.cs')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLEstateData.cs23
1 files changed, 2 insertions, 21 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 }