aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
authorMelanie2012-02-02 23:40:56 +0000
committerMelanie2012-02-02 23:40:56 +0000
commit447a66d66005c5ec54a786d1d0a532738729251c (patch)
tree78c286a7c43586e7ce0747bd71369c3a3be344df /OpenSim/Data/MySQL/MySQLSimulationData.cs
parentOpenID: server connector had a copy-and-paste error that made identity querie... (diff)
downloadopensim-SC_OLD-447a66d66005c5ec54a786d1d0a532738729251c.zip
opensim-SC_OLD-447a66d66005c5ec54a786d1d0a532738729251c.tar.gz
opensim-SC_OLD-447a66d66005c5ec54a786d1d0a532738729251c.tar.bz2
opensim-SC_OLD-447a66d66005c5ec54a786d1d0a532738729251c.tar.xz
Replace ParcelAccessEntry with a new struct, LandAccessEntry, which more
accurately reflects the data sent by the viewer. Add times bans and the expiration of timed bans. Warning: Contains a Migration (and nuts)
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 3123edf..3275146 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -700,10 +700,10 @@ namespace OpenSim.Data.MySQL
700 700
701 cmd.Parameters.Clear(); 701 cmd.Parameters.Clear();
702 cmd.CommandText = "insert into landaccesslist (LandUUID, " + 702 cmd.CommandText = "insert into landaccesslist (LandUUID, " +
703 "AccessUUID, Flags) values (?LandUUID, ?AccessUUID, " + 703 "AccessUUID, Flags, Expires) values (?LandUUID, ?AccessUUID, " +
704 "?Flags)"; 704 "?Flags, ?Expires)";
705 705
706 foreach (ParcelManager.ParcelAccessEntry entry in parcel.LandData.ParcelAccessList) 706 foreach (LandAccessEntry entry in parcel.LandData.ParcelAccessList)
707 { 707 {
708 FillLandAccessCommand(cmd, entry, parcel.LandData.GlobalID); 708 FillLandAccessCommand(cmd, entry, parcel.LandData.GlobalID);
709 ExecuteNonQuery(cmd); 709 ExecuteNonQuery(cmd);
@@ -1377,7 +1377,7 @@ namespace OpenSim.Data.MySQL
1377 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); 1377 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
1378 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); 1378 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
1379 1379
1380 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 1380 newData.ParcelAccessList = new List<LandAccessEntry>();
1381 1381
1382 return newData; 1382 return newData;
1383 } 1383 }
@@ -1387,12 +1387,12 @@ namespace OpenSim.Data.MySQL
1387 /// </summary> 1387 /// </summary>
1388 /// <param name="row"></param> 1388 /// <param name="row"></param>
1389 /// <returns></returns> 1389 /// <returns></returns>
1390 private static ParcelManager.ParcelAccessEntry BuildLandAccessData(IDataReader row) 1390 private static LandAccessEntry BuildLandAccessData(IDataReader row)
1391 { 1391 {
1392 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 1392 LandAccessEntry entry = new LandAccessEntry();
1393 entry.AgentID = DBGuid.FromDB(row["AccessUUID"]); 1393 entry.AgentID = DBGuid.FromDB(row["AccessUUID"]);
1394 entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]); 1394 entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]);
1395 entry.Time = new DateTime(); 1395 entry.Expires = Convert.ToInt32(row["Expires"]);
1396 return entry; 1396 return entry;
1397 } 1397 }
1398 1398
@@ -1697,11 +1697,12 @@ namespace OpenSim.Data.MySQL
1697 /// <param name="row"></param> 1697 /// <param name="row"></param>
1698 /// <param name="entry"></param> 1698 /// <param name="entry"></param>
1699 /// <param name="parcelID"></param> 1699 /// <param name="parcelID"></param>
1700 private static void FillLandAccessCommand(MySqlCommand cmd, ParcelManager.ParcelAccessEntry entry, UUID parcelID) 1700 private static void FillLandAccessCommand(MySqlCommand cmd, LandAccessEntry entry, UUID parcelID)
1701 { 1701 {
1702 cmd.Parameters.AddWithValue("LandUUID", parcelID.ToString()); 1702 cmd.Parameters.AddWithValue("LandUUID", parcelID.ToString());
1703 cmd.Parameters.AddWithValue("AccessUUID", entry.AgentID.ToString()); 1703 cmd.Parameters.AddWithValue("AccessUUID", entry.AgentID.ToString());
1704 cmd.Parameters.AddWithValue("Flags", entry.Flags); 1704 cmd.Parameters.AddWithValue("Flags", entry.Flags);
1705 cmd.Parameters.AddWithValue("Expires", entry.Expires.ToString());
1705 } 1706 }
1706 1707
1707 /// <summary> 1708 /// <summary>