aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
index 17a864d..0ec039b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
@@ -179,6 +179,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
179 179
180 rootElement.AppendChild(plugins); 180 rootElement.AppendChild(plugins);
181 181
182 if (instance.ScriptTask != null)
183 {
184 if (instance.ScriptTask.PermsMask != 0 && instance.ScriptTask.PermsGranter != UUID.Zero)
185 {
186 XmlNode permissions = xmldoc.CreateElement("", "Permissions", "");
187 XmlAttribute granter = xmldoc.CreateAttribute("", "granter", "");
188 granter.Value = instance.ScriptTask.PermsGranter.ToString();
189 permissions.Attributes.Append(granter);
190 XmlAttribute mask = xmldoc.CreateAttribute("", "mask", "");
191 mask.Value = instance.ScriptTask.PermsMask.ToString();
192 permissions.Attributes.Append(mask);
193 rootElement.AppendChild(permissions);
194 }
195 }
196
182 return xmldoc.InnerXml; 197 return xmldoc.InnerXml;
183 } 198 }
184 199
@@ -342,6 +357,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
342 case "Plugins": 357 case "Plugins":
343 instance.PluginData = ReadList(part).Data; 358 instance.PluginData = ReadList(part).Data;
344 break; 359 break;
360 case "Permissions":
361 string tmpPerm;
362 int mask = 0;
363 tmpPerm = part.Attributes.GetNamedItem("mask").Value;
364 if (tmpPerm != null)
365 {
366 int.TryParse(tmpPerm, out mask);
367 if (mask != 0)
368 {
369 tmpPerm = part.Attributes.GetNamedItem("granter").Value;
370 if (tmpPerm != null)
371 {
372 UUID granter = new UUID();
373 UUID.TryParse(tmpPerm, out granter);
374 if (granter != UUID.Zero)
375 {
376 instance.ScriptTask.PermsMask = mask;
377 instance.ScriptTask.PermsGranter = granter;
378 }
379 }
380 }
381 }
382 break;
345 } 383 }
346 } 384 }
347 } 385 }