aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/WorldComm
diff options
context:
space:
mode:
authorRevolution2010-01-22 18:09:33 -0600
committerMelanie2010-01-23 15:18:52 +0000
commitec3c31e61e5e540f822891110df9bc978655bbaf (patch)
treeb0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/CoreModules/Scripting/WorldComm
parentadd a target position to agent updates to ScenePresence to support alternativ... (diff)
downloadopensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2
opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/WorldComm')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs37
1 files changed, 25 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
index 60df2e7..acd8dbf 100644
--- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using Mono.Addins;
31using Nini.Config; 32using Nini.Config;
32using OpenMetaverse; 33using OpenMetaverse;
33using OpenSim.Framework; 34using OpenSim.Framework;
@@ -85,7 +86,8 @@ using OpenSim.Region.Framework.Scenes;
85 86
86namespace OpenSim.Region.CoreModules.Scripting.WorldComm 87namespace OpenSim.Region.CoreModules.Scripting.WorldComm
87{ 88{
88 public class WorldCommModule : IRegionModule, IWorldComm 89 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
90 public class WorldCommModule : INonSharedRegionModule, IWorldComm
89 { 91 {
90 // private static readonly ILog m_log = 92 // private static readonly ILog m_log =
91 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 93 // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -98,9 +100,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
98 private int m_saydistance = 30; 100 private int m_saydistance = 30;
99 private int m_shoutdistance = 100; 101 private int m_shoutdistance = 100;
100 102
101 #region IRegionModule Members 103 #region ISharedRegionModule Members
102 104
103 public void Initialise(Scene scene, IConfigSource config) 105 public void Initialise(IConfigSource config)
104 { 106 {
105 // wrap this in a try block so that defaults will work if 107 // wrap this in a try block so that defaults will work if
106 // the config file doesn't specify otherwise. 108 // the config file doesn't specify otherwise.
@@ -120,31 +122,42 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
120 if (maxlisteners < 1) maxlisteners = int.MaxValue; 122 if (maxlisteners < 1) maxlisteners = int.MaxValue;
121 if (maxhandles < 1) maxhandles = int.MaxValue; 123 if (maxhandles < 1) maxhandles = int.MaxValue;
122 124
125 m_listenerManager = new ListenerManager(maxlisteners, maxhandles);
126 m_pendingQ = new Queue();
127 m_pending = Queue.Synchronized(m_pendingQ);
128 }
129
130 public void AddRegion(Scene scene)
131 {
123 m_scene = scene; 132 m_scene = scene;
124 m_scene.RegisterModuleInterface<IWorldComm>(this); 133 m_scene.RegisterModuleInterface<IWorldComm>(this);
125 m_listenerManager = new ListenerManager(maxlisteners, maxhandles);
126 m_scene.EventManager.OnChatFromClient += DeliverClientMessage; 134 m_scene.EventManager.OnChatFromClient += DeliverClientMessage;
127 m_scene.EventManager.OnChatBroadcast += DeliverClientMessage; 135 m_scene.EventManager.OnChatBroadcast += DeliverClientMessage;
128 m_pendingQ = new Queue();
129 m_pending = Queue.Synchronized(m_pendingQ);
130 } 136 }
131 137
132 public void PostInitialise() 138 public Type ReplaceableInterface
133 { 139 {
140 get { return null; }
134 } 141 }
135 142
136 public void Close() 143 public void RegionLoaded(Scene scene)
137 { 144 {
138 } 145 }
139 146
140 public string Name 147 public void RemoveRegion(Scene scene)
141 { 148 {
142 get { return "WorldCommModule"; } 149 scene.UnregisterModuleInterface<IWorldComm>(this);
150 scene.EventManager.OnChatFromClient -= DeliverClientMessage;
151 scene.EventManager.OnChatBroadcast -= DeliverClientMessage;
143 } 152 }
144 153
145 public bool IsSharedModule 154 public void Close()
146 { 155 {
147 get { return false; } 156 }
157
158 public string Name
159 {
160 get { return "WorldCommModule"; }
148 } 161 }
149 162
150 #endregion 163 #endregion