Small adjustments to the floater module

avinationmerge
Melanie 2013-05-13 02:15:48 +02:00
parent 3f6071ce3a
commit 296b43f597
2 changed files with 5 additions and 2 deletions

View File

@ -37,7 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces
public abstract class FloaterData public abstract class FloaterData
{ {
public abstract int Channel { get; } public abstract int Channel { get; }
public abstract string FloaterName { get; } public abstract string FloaterName { get; set; }
public virtual string XmlName { get; set; } public virtual string XmlName { get; set; }
public virtual string XmlText { get; set; } public virtual string XmlText { get; set; }
public virtual HandlerDelegate Handler { get; set; } public virtual HandlerDelegate Handler { get; set; }

View File

@ -122,6 +122,9 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
if (!m_floaters.ContainsKey(agentID)) if (!m_floaters.ContainsKey(agentID))
m_floaters[agentID] = new Dictionary<int, FloaterData>(); m_floaters[agentID] = new Dictionary<int, FloaterData>();
if (m_floaters[agentID].ContainsKey(dialogData.Channel))
return;
m_floaters[agentID].Add(dialogData.Channel, dialogData); m_floaters[agentID].Add(dialogData.Channel, dialogData);
string xml; string xml;
@ -218,7 +221,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
} }
} }
if (data.Handler(client, data, parts)) if (data.Handler != null && data.Handler(client, data, parts))
{ {
m_floaters[client.AgentId].Remove(data.Channel); m_floaters[client.AgentId].Remove(data.Channel);
SendToClient(sp, String.Format("># floater {0} destroy", data.FloaterName)); SendToClient(sp, String.Format("># floater {0} destroy", data.FloaterName));