aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorMelanie2013-05-04 00:45:27 +0200
committerMelanie2013-05-04 00:45:27 +0200
commit23324539745848f28308f3de28aa0278b662e1b5 (patch)
tree5d1d610386dca3e245f71b8ed6b4690b4c4f0434 /OpenSim/Region/OptionalModules
parentAdd llGetPhysicsMaterial (diff)
downloadopensim-SC_OLD-23324539745848f28308f3de28aa0278b662e1b5.zip
opensim-SC_OLD-23324539745848f28308f3de28aa0278b662e1b5.tar.gz
opensim-SC_OLD-23324539745848f28308f3de28aa0278b662e1b5.tar.bz2
opensim-SC_OLD-23324539745848f28308f3de28aa0278b662e1b5.tar.xz
Add RegionManager level and the ability to use literal XML to the dynamic floater module
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs13
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs7
2 files changed, 15 insertions, 5 deletions
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs
index 7919fef..4524a05 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs
@@ -125,10 +125,17 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
125 m_floaters[agentID].Add(dialogData.Channel, dialogData); 125 m_floaters[agentID].Add(dialogData.Channel, dialogData);
126 126
127 string xml; 127 string xml;
128 using (FileStream fs = File.Open(dialogData.XmlName + ".xml", FileMode.Open)) 128 if (dialogData.XmlText != null && dialogData.XmlText != String.Empty)
129 { 129 {
130 using (StreamReader sr = new StreamReader(fs)) 130 xml = dialogData.XmlText;
131 xml = sr.ReadToEnd().Replace("\n", ""); 131 }
132 else
133 {
134 using (FileStream fs = File.Open(dialogData.XmlName + ".xml", FileMode.Open))
135 {
136 using (StreamReader sr = new StreamReader(fs))
137 xml = sr.ReadToEnd().Replace("\n", "");
138 }
132 } 139 }
133 140
134 List<string> xparts = new List<string>(); 141 List<string> xparts = new List<string>();
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
index 917911f..c68fe99 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
@@ -110,8 +110,11 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
110 { 110 {
111 foreach (MenuItemData d in m_menuItems[UUID.Zero]) 111 foreach (MenuItemData d in m_menuItems[UUID.Zero])
112 { 112 {
113 if (d.Mode == UserMode.God && (!m_scene.Permissions.IsGod(agentID))) 113 if (!m_scene.Permissions.IsGod(agentID))
114 continue; 114 {
115 if (d.Mode == UserMode.RegionManager && (!m_scene.Permissions.IsAdministrator(agentID)))
116 continue;
117 }
115 118
116 OSDMap loc = null; 119 OSDMap loc = null;
117 switch (d.Location) 120 switch (d.Location)