aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/WorldCommModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/WorldCommModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/WorldCommModule.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs
index 6b9ae46..a426eda 100644
--- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs
@@ -70,6 +70,7 @@ namespace OpenSim.Region.Environment.Modules
70 { 70 {
71 private Scene m_scene; 71 private Scene m_scene;
72 private object CommListLock = new object(); 72 private object CommListLock = new object();
73 private object ListLock = new object();
73 private string m_name = "WorldCommModule"; 74 private string m_name = "WorldCommModule";
74 private ListenerManager m_listenerManager; 75 private ListenerManager m_listenerManager;
75 private Queue<ListenerInfo> m_pending; 76 private Queue<ListenerInfo> m_pending;
@@ -136,6 +137,15 @@ namespace OpenSim.Region.Environment.Modules
136 m_listenerManager.Remove(handle); 137 m_listenerManager.Remove(handle);
137 } 138 }
138 139
140 public void DeleteListener(LLUUID itemID)
141 {
142 lock (ListLock)
143 {
144 m_listenerManager.DeleteListener(itemID);
145 }
146
147 }
148
139 // This method scans nearby objects and determines if they are listeners, 149 // This method scans nearby objects and determines if they are listeners,
140 // and if so if this message fits the filter. If it does, then 150 // and if so if this message fits the filter. If it does, then
141 // enqueue the message for delivery to the objects listen event handler. 151 // enqueue the message for delivery to the objects listen event handler.
@@ -303,6 +313,18 @@ namespace OpenSim.Region.Environment.Modules
303 m_listeners.Remove(handle); 313 m_listeners.Remove(handle);
304 } 314 }
305 315
316 public void DeleteListener(LLUUID itemID)
317 {
318 foreach (ListenerInfo li in m_listeners.Values)
319 {
320 if (li.GetItemID().Equals(itemID))
321 {
322 Remove(li.GetHandle());
323 return;
324 }
325 }
326 }
327
306 private int GetNewHandle() 328 private int GetNewHandle()
307 { 329 {
308 for (int i = 0; i < int.MaxValue - 1; i++) 330 for (int i = 0; i < int.MaxValue - 1; i++)