Add RegionManager level and the ability to use literal XML to the dynamic floater module
parent
4904d40138
commit
2332453974
|
@ -39,6 +39,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
public abstract int Channel { get; }
|
public abstract int Channel { get; }
|
||||||
public abstract string FloaterName { get; }
|
public abstract string FloaterName { get; }
|
||||||
public virtual string XmlName { get; set; }
|
public virtual string XmlName { get; set; }
|
||||||
|
public virtual string XmlText { get; set; }
|
||||||
public virtual HandlerDelegate Handler { get; set; }
|
public virtual HandlerDelegate Handler { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
public enum UserMode : int
|
public enum UserMode : int
|
||||||
{
|
{
|
||||||
Normal = 0,
|
Normal = 0,
|
||||||
|
RegionManager = 2,
|
||||||
God = 3
|
God = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,10 +125,17 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
|
||||||
m_floaters[agentID].Add(dialogData.Channel, dialogData);
|
m_floaters[agentID].Add(dialogData.Channel, dialogData);
|
||||||
|
|
||||||
string xml;
|
string xml;
|
||||||
using (FileStream fs = File.Open(dialogData.XmlName + ".xml", FileMode.Open))
|
if (dialogData.XmlText != null && dialogData.XmlText != String.Empty)
|
||||||
{
|
{
|
||||||
using (StreamReader sr = new StreamReader(fs))
|
xml = dialogData.XmlText;
|
||||||
xml = sr.ReadToEnd().Replace("\n", "");
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (FileStream fs = File.Open(dialogData.XmlName + ".xml", FileMode.Open))
|
||||||
|
{
|
||||||
|
using (StreamReader sr = new StreamReader(fs))
|
||||||
|
xml = sr.ReadToEnd().Replace("\n", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<string> xparts = new List<string>();
|
List<string> xparts = new List<string>();
|
||||||
|
|
|
@ -110,8 +110,11 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
|
||||||
{
|
{
|
||||||
foreach (MenuItemData d in m_menuItems[UUID.Zero])
|
foreach (MenuItemData d in m_menuItems[UUID.Zero])
|
||||||
{
|
{
|
||||||
if (d.Mode == UserMode.God && (!m_scene.Permissions.IsGod(agentID)))
|
if (!m_scene.Permissions.IsGod(agentID))
|
||||||
continue;
|
{
|
||||||
|
if (d.Mode == UserMode.RegionManager && (!m_scene.Permissions.IsAdministrator(agentID)))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
OSDMap loc = null;
|
OSDMap loc = null;
|
||||||
switch (d.Location)
|
switch (d.Location)
|
||||||
|
|
Loading…
Reference in New Issue