aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Serialization/External/LandDataSerializer.cs')
-rw-r--r--OpenSim/Framework/Serialization/External/LandDataSerializer.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
index fc0387b..c61b9e8 100644
--- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Framework.Serialization.External
90 landData.MusicURL = xtr.ReadElementString("MusicURL"); 90 landData.MusicURL = xtr.ReadElementString("MusicURL");
91 landData.OwnerID = UUID.Parse( xtr.ReadElementString("OwnerID")); 91 landData.OwnerID = UUID.Parse( xtr.ReadElementString("OwnerID"));
92 92
93 landData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 93 landData.ParcelAccessList = new List<LandAccessEntry>();
94 xtr.Read(); 94 xtr.Read();
95 if (xtr.Name != "ParcelAccessList") 95 if (xtr.Name != "ParcelAccessList")
96 throw new XmlException(String.Format("Expected \"ParcelAccessList\" element but got \"{0}\"", xtr.Name)); 96 throw new XmlException(String.Format("Expected \"ParcelAccessList\" element but got \"{0}\"", xtr.Name));
@@ -99,11 +99,13 @@ namespace OpenSim.Framework.Serialization.External
99 { 99 {
100 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement) 100 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
101 { 101 {
102 ParcelManager.ParcelAccessEntry pae = new ParcelManager.ParcelAccessEntry(); 102 LandAccessEntry pae = new LandAccessEntry();
103 103
104 xtr.ReadStartElement("ParcelAccessEntry"); 104 xtr.ReadStartElement("ParcelAccessEntry");
105 pae.AgentID = UUID.Parse( xtr.ReadElementString("AgentID")); 105 pae.AgentID = UUID.Parse( xtr.ReadElementString("AgentID"));
106 pae.Time = Convert.ToDateTime( xtr.ReadElementString("Time")); 106 // We really don't care about temp vs perm here and this
107 // would break on old oars. Assume all bans are perm
108 pae.Expires = 0; // Convert.ToUint( xtr.ReadElementString("Time"));
107 pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList")); 109 pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList"));
108 xtr.ReadEndElement(); 110 xtr.ReadEndElement();
109 111
@@ -162,11 +164,11 @@ namespace OpenSim.Framework.Serialization.External
162 xtw.WriteElementString("OwnerID", landData.OwnerID.ToString()); 164 xtw.WriteElementString("OwnerID", landData.OwnerID.ToString());
163 165
164 xtw.WriteStartElement("ParcelAccessList"); 166 xtw.WriteStartElement("ParcelAccessList");
165 foreach (ParcelManager.ParcelAccessEntry pal in landData.ParcelAccessList) 167 foreach (LandAccessEntry pal in landData.ParcelAccessList)
166 { 168 {
167 xtw.WriteStartElement("ParcelAccessEntry"); 169 xtw.WriteStartElement("ParcelAccessEntry");
168 xtw.WriteElementString("AgentID", pal.AgentID.ToString()); 170 xtw.WriteElementString("AgentID", pal.AgentID.ToString());
169 xtw.WriteElementString("Time", pal.Time.ToString("s")); 171 xtw.WriteElementString("Time", pal.Expires.ToString());
170 xtw.WriteElementString("AccessList", Convert.ToString((uint)pal.Flags)); 172 xtw.WriteElementString("AccessList", Convert.ToString((uint)pal.Flags));
171 xtw.WriteEndElement(); 173 xtw.WriteEndElement();
172 } 174 }