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 string FloaterName { get; }
|
||||
public virtual string XmlName { get; set; }
|
||||
public virtual string XmlText { get; set; }
|
||||
public virtual HandlerDelegate Handler { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
public enum UserMode : int
|
||||
{
|
||||
Normal = 0,
|
||||
RegionManager = 2,
|
||||
God = 3
|
||||
}
|
||||
|
||||
|
|
|
@ -125,11 +125,18 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
|
|||
m_floaters[agentID].Add(dialogData.Channel, dialogData);
|
||||
|
||||
string xml;
|
||||
if (dialogData.XmlText != null && dialogData.XmlText != String.Empty)
|
||||
{
|
||||
xml = dialogData.XmlText;
|
||||
}
|
||||
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>();
|
||||
|
||||
|
|
|
@ -110,8 +110,11 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
|
|||
{
|
||||
foreach (MenuItemData d in m_menuItems[UUID.Zero])
|
||||
{
|
||||
if (d.Mode == UserMode.God && (!m_scene.Permissions.IsGod(agentID)))
|
||||
if (!m_scene.Permissions.IsGod(agentID))
|
||||
{
|
||||
if (d.Mode == UserMode.RegionManager && (!m_scene.Permissions.IsAdministrator(agentID)))
|
||||
continue;
|
||||
}
|
||||
|
||||
OSDMap loc = null;
|
||||
switch (d.Location)
|
||||
|
|
Loading…
Reference in New Issue