aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs1
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDynamicMenuModule.cs1
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs13
-rw-r--r--OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs7
4 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
index 5e633e6..65c42ff 100644
--- a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs
@@ -39,6 +39,7 @@ namespace OpenSim.Region.Framework.Interfaces
39 public abstract int Channel { get; } 39 public abstract int Channel { get; }
40 public abstract string FloaterName { get; } 40 public abstract string FloaterName { get; }
41 public virtual string XmlName { get; set; } 41 public virtual string XmlName { get; set; }
42 public virtual string XmlText { get; set; }
42 public virtual HandlerDelegate Handler { get; set; } 43 public virtual HandlerDelegate Handler { get; set; }
43 } 44 }
44 45
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicMenuModule.cs b/OpenSim/Region/Framework/Interfaces/IDynamicMenuModule.cs
index 08b71e4..4d000b6 100644
--- a/OpenSim/Region/Framework/Interfaces/IDynamicMenuModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDynamicMenuModule.cs
@@ -43,6 +43,7 @@ namespace OpenSim.Region.Framework.Interfaces
43 public enum UserMode : int 43 public enum UserMode : int
44 { 44 {
45 Normal = 0, 45 Normal = 0,
46 RegionManager = 2,
46 God = 3 47 God = 3
47 } 48 }
48 49
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)