diff options
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index d935c56..93aa88c 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using Mono.Addins; | ||
32 | using Nini.Config; | 31 | using Nini.Config; |
33 | using OpenMetaverse; | 32 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -86,8 +85,7 @@ using OpenSim.Region.Framework.Scenes; | |||
86 | 85 | ||
87 | namespace OpenSim.Region.CoreModules.Scripting.WorldComm | 86 | namespace OpenSim.Region.CoreModules.Scripting.WorldComm |
88 | { | 87 | { |
89 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 88 | public class WorldCommModule : IRegionModule, IWorldComm |
90 | public class WorldCommModule : ISharedRegionModule, IWorldComm | ||
91 | { | 89 | { |
92 | // private static readonly ILog m_log = | 90 | // private static readonly ILog m_log = |
93 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 91 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -100,9 +98,9 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
100 | private int m_saydistance = 30; | 98 | private int m_saydistance = 30; |
101 | private int m_shoutdistance = 100; | 99 | private int m_shoutdistance = 100; |
102 | 100 | ||
103 | #region ISharedRegionModule Members | 101 | #region IRegionModule Members |
104 | 102 | ||
105 | public void Initialise(IConfigSource config) | 103 | public void Initialise(Scene scene, IConfigSource config) |
106 | { | 104 | { |
107 | // wrap this in a try block so that defaults will work if | 105 | // wrap this in a try block so that defaults will work if |
108 | // the config file doesn't specify otherwise. | 106 | // the config file doesn't specify otherwise. |
@@ -122,6 +120,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
122 | if (maxlisteners < 1) maxlisteners = int.MaxValue; | 120 | if (maxlisteners < 1) maxlisteners = int.MaxValue; |
123 | if (maxhandles < 1) maxhandles = int.MaxValue; | 121 | if (maxhandles < 1) maxhandles = int.MaxValue; |
124 | 122 | ||
123 | <<<<<<< HEAD:OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | ||
125 | m_listenerManager = new ListenerManager(maxlisteners, maxhandles); | 124 | m_listenerManager = new ListenerManager(maxlisteners, maxhandles); |
126 | m_pendingQ = new Queue(); | 125 | m_pendingQ = new Queue(); |
127 | m_pending = Queue.Synchronized(m_pendingQ); | 126 | m_pending = Queue.Synchronized(m_pendingQ); |
@@ -133,26 +132,19 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
133 | 132 | ||
134 | public void AddRegion(Scene scene) | 133 | public void AddRegion(Scene scene) |
135 | { | 134 | { |
135 | ======= | ||
136 | >>>>>>> ec3c31e... Updates all IRegionModules to the new style region modules.:OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | ||
136 | m_scene = scene; | 137 | m_scene = scene; |
137 | m_scene.RegisterModuleInterface<IWorldComm>(this); | 138 | m_scene.RegisterModuleInterface<IWorldComm>(this); |
139 | m_listenerManager = new ListenerManager(maxlisteners, maxhandles); | ||
138 | m_scene.EventManager.OnChatFromClient += DeliverClientMessage; | 140 | m_scene.EventManager.OnChatFromClient += DeliverClientMessage; |
139 | m_scene.EventManager.OnChatBroadcast += DeliverClientMessage; | 141 | m_scene.EventManager.OnChatBroadcast += DeliverClientMessage; |
142 | m_pendingQ = new Queue(); | ||
143 | m_pending = Queue.Synchronized(m_pendingQ); | ||
140 | } | 144 | } |
141 | 145 | ||
142 | public Type ReplaceableInterface | 146 | public void PostInitialise() |
143 | { | ||
144 | get { return null; } | ||
145 | } | ||
146 | |||
147 | public void RegionLoaded(Scene scene) | ||
148 | { | ||
149 | } | ||
150 | |||
151 | public void RemoveRegion(Scene scene) | ||
152 | { | 147 | { |
153 | scene.UnregisterModuleInterface<IWorldComm>(this); | ||
154 | scene.EventManager.OnChatFromClient -= DeliverClientMessage; | ||
155 | scene.EventManager.OnChatBroadcast -= DeliverClientMessage; | ||
156 | } | 148 | } |
157 | 149 | ||
158 | public void Close() | 150 | public void Close() |
@@ -164,6 +156,11 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
164 | get { return "WorldCommModule"; } | 156 | get { return "WorldCommModule"; } |
165 | } | 157 | } |
166 | 158 | ||
159 | public bool IsSharedModule | ||
160 | { | ||
161 | get { return false; } | ||
162 | } | ||
163 | |||
167 | #endregion | 164 | #endregion |
168 | 165 | ||
169 | #region IWorldComm Members | 166 | #region IWorldComm Members |