aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting
diff options
context:
space:
mode:
authorMelanie2010-01-29 07:20:13 +0000
committerMelanie2010-01-29 07:21:06 +0000
commita87a247f0548d39a8c39b1d28123d7da8db44598 (patch)
tree7f9f77c38a224bc6d4bea7ccced1d4710c8a91b1 /OpenSim/Region/CoreModules/Scripting
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.zip
opensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.gz
opensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.bz2
opensim-SC_OLD-a87a247f0548d39a8c39b1d28123d7da8db44598.tar.xz
Revert "Updates all IRegionModules to the new style region modules."
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs60
-rw-r--r--OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs32
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs36
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs37
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs41
-rw-r--r--OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs33
-rw-r--r--OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs51
8 files changed, 89 insertions, 203 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 40b7159..679c871 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -29,7 +29,6 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Drawing; 30using System.Drawing;
31using System.Drawing.Imaging; 31using System.Drawing.Imaging;
32using Mono.Addins;
33using Nini.Config; 32using Nini.Config;
34using OpenMetaverse; 33using OpenMetaverse;
35using OpenMetaverse.Imaging; 34using OpenMetaverse.Imaging;
@@ -41,8 +40,7 @@ using System.Reflection;
41 40
42namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture 41namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
43{ 42{
44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 43 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager
45 public class DynamicTextureModule : ISharedRegionModule, IDynamicTextureManager
46 { 44 {
47 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 46
@@ -212,14 +210,9 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
212 210
213 #endregion 211 #endregion
214 212
215 #region ISharedRegionModule Members 213 #region IRegionModule Members
216 214
217 public void Initialise(IConfigSource config) 215 public void Initialise(Scene scene, IConfigSource config)
218 {
219
220 }
221
222 public void AddRegion(Scene scene)
223 { 216 {
224 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) 217 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
225 { 218 {
@@ -228,24 +221,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
228 } 221 }
229 } 222 }
230 223
231 public Type ReplaceableInterface
232 {
233 get { return null; }
234 }
235
236 public void RegionLoaded(Scene scene)
237 {
238 }
239
240 public void RemoveRegion(Scene scene)
241 {
242 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
243 {
244 RegisteredScenes.Remove(scene.RegionInfo.RegionID);
245 scene.UnregisterModuleInterface<IDynamicTextureManager>(this);
246 }
247 }
248
249 public void PostInitialise() 224 public void PostInitialise()
250 { 225 {
251 } 226 }
@@ -259,6 +234,11 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
259 get { return "DynamicTextureModule"; } 234 get { return "DynamicTextureModule"; }
260 } 235 }
261 236
237 public bool IsSharedModule
238 {
239 get { return true; }
240 }
241
262 #endregion 242 #endregion
263 243
264 #region Nested type: DynamicTextureUpdater 244 #region Nested type: DynamicTextureUpdater
@@ -378,18 +358,18 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
378 // tmptex.DefaultTexture.Fullbright = true; 358 // tmptex.DefaultTexture.Fullbright = true;
379 359
380 part.UpdateTexture(tmptex); 360 part.UpdateTexture(tmptex);
381 } 361 }
382 362
383 if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0)) 363 if (oldID != UUID.Zero && ((Disp & DISP_EXPIRE) != 0))
384 { 364 {
385 if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString()); 365 if (oldAsset == null) oldAsset = scene.AssetService.Get(oldID.ToString());
386 if (oldAsset != null) 366 if (oldAsset != null)
387 { 367 {
388 if (oldAsset.Temporary == true) 368 if (oldAsset.Temporary == true)
389 { 369 {
390 scene.AssetService.Delete(oldID.ToString()); 370 scene.AssetService.Delete(oldID.ToString());
391 } 371 }
392 } 372 }
393 } 373 }
394 } 374 }
395 375
diff --git a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
index d6ed468..83f004d 100644
--- a/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/EMailModules/EmailModule.cs
@@ -32,7 +32,6 @@ using System.Text.RegularExpressions;
32using DotNetOpenMail; 32using DotNetOpenMail;
33using DotNetOpenMail.SmtpAuth; 33using DotNetOpenMail.SmtpAuth;
34using log4net; 34using log4net;
35using Mono.Addins;
36using Nini.Config; 35using Nini.Config;
37using OpenMetaverse; 36using OpenMetaverse;
38using OpenSim.Framework; 37using OpenSim.Framework;
@@ -41,7 +40,6 @@ using OpenSim.Region.Framework.Scenes;
41 40
42namespace OpenSim.Region.CoreModules.Scripting.EmailModules 41namespace OpenSim.Region.CoreModules.Scripting.EmailModules
43{ 42{
44 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
45 public class EmailModule : IEmailModule 43 public class EmailModule : IEmailModule
46 { 44 {
47 // 45 //
@@ -96,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
96 } 94 }
97 } 95 }
98 96
99 public void Initialise(IConfigSource config) 97 public void Initialise(Scene scene, IConfigSource config)
100 { 98 {
101 m_Config = config; 99 m_Config = config;
102 IConfig SMTPConfig; 100 IConfig SMTPConfig;
@@ -138,16 +136,7 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
138 m_Enabled = false; 136 m_Enabled = false;
139 return; 137 return;
140 } 138 }
141 m_log.Info("[EMAIL] Activated DefaultEmailModule");
142 }
143
144 public Type ReplaceableInterface
145 {
146 get { return null; }
147 }
148 139
149 public void AddRegion(Scene scene)
150 {
151 // It's a go! 140 // It's a go!
152 if (m_Enabled) 141 if (m_Enabled)
153 { 142 {
@@ -166,20 +155,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
166 m_Scenes.Add(scene.RegionInfo.RegionHandle, scene); 155 m_Scenes.Add(scene.RegionInfo.RegionHandle, scene);
167 } 156 }
168 } 157 }
169 }
170 }
171
172 public void RegionLoaded(Scene scene)
173 {
174 }
175 158
176 public void RemoveRegion(Scene scene) 159 m_log.Info("[EMAIL] Activated DefaultEmailModule");
177 {
178 scene.UnregisterModuleInterface<IEmailModule>(this);
179
180 if (m_Scenes.ContainsKey(scene.RegionInfo.RegionHandle))
181 {
182 m_Scenes.Remove(scene.RegionInfo.RegionHandle);
183 } 160 }
184 } 161 }
185 162
@@ -196,6 +173,11 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
196 get { return "DefaultEmailModule"; } 173 get { return "DefaultEmailModule"; }
197 } 174 }
198 175
176 public bool IsSharedModule
177 {
178 get { return true; }
179 }
180
199 /// <summary> 181 /// <summary>
200 /// Delay function using thread in seconds 182 /// Delay function using thread in seconds
201 /// </summary> 183 /// </summary>
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index e331b8d..d78931a 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -31,7 +31,6 @@ using System.IO;
31using System.Net; 31using System.Net;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using Mono.Addins;
35using Nini.Config; 34using Nini.Config;
36using OpenMetaverse; 35using OpenMetaverse;
37using OpenSim.Framework; 36using OpenSim.Framework;
@@ -85,8 +84,7 @@ using OpenSim.Region.Framework.Scenes;
85 84
86namespace OpenSim.Region.CoreModules.Scripting.HttpRequest 85namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
87{ 86{
88 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 87 public class HttpRequestModule : IRegionModule, IHttpRequestModule
89 public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule
90 { 88 {
91 private object HttpListLock = new object(); 89 private object HttpListLock = new object();
92 private int httpTimeout = 30000; 90 private int httpTimeout = 30000;
@@ -231,35 +229,18 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
231 229
232 #endregion 230 #endregion
233 231
234 #region ISharedRegionModule Members 232 #region IRegionModule Members
235 233
236 public void Initialise(IConfigSource config) 234 public void Initialise(Scene scene, IConfigSource config)
237 {
238 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
239 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
240
241 m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
242 }
243
244 public void AddRegion(Scene scene)
245 { 235 {
246 m_scene = scene; 236 m_scene = scene;
247 237
248 m_scene.RegisterModuleInterface<IHttpRequestModule>(this); 238 m_scene.RegisterModuleInterface<IHttpRequestModule>(this);
249 }
250
251 public Type ReplaceableInterface
252 {
253 get { return null; }
254 }
255 239
256 public void RegionLoaded(Scene scene) 240 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
257 { 241 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
258 }
259 242
260 public void RemoveRegion(Scene scene) 243 m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
261 {
262 scene.UnregisterModuleInterface<IHttpRequestModule>(this);
263 } 244 }
264 245
265 public void PostInitialise() 246 public void PostInitialise()
@@ -275,6 +256,11 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
275 get { return m_name; } 256 get { return m_name; }
276 } 257 }
277 258
259 public bool IsSharedModule
260 {
261 get { return true; }
262 }
263
278 #endregion 264 #endregion
279 } 265 }
280 266
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index 6ce55a9..9b565ed 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -126,8 +126,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
126 126
127 public void RemoveRegion(Scene scene) 127 public void RemoveRegion(Scene scene)
128 { 128 {
129 scene.UnregisterModuleInterface<IUrlModule>(this);
130 scene.EventManager.OnScriptReset -= OnScriptReset;
131 } 129 }
132 130
133 public void Close() 131 public void Close()
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 35ce2cb..c23cea5 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -29,7 +29,6 @@ using System;
29using System.Drawing; 29using System.Drawing;
30using System.IO; 30using System.IO;
31using System.Net; 31using System.Net;
32using Mono.Addins;
33using Nini.Config; 32using Nini.Config;
34using OpenMetaverse; 33using OpenMetaverse;
35using OpenMetaverse.Imaging; 34using OpenMetaverse.Imaging;
@@ -40,8 +39,7 @@ using System.Reflection;
40 39
41namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL 40namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
42{ 41{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 42 public class LoadImageURLModule : IRegionModule, IDynamicTextureRender
44 public class LoadImageURLModule : ISharedRegionModule, IDynamicTextureRender
45 { 43 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 45
@@ -99,28 +97,20 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
99 97
100 #endregion 98 #endregion
101 99
102 #region ISharedRegionModule Members 100 #region IRegionModule Members
103 101
104 public void Initialise(IConfigSource config) 102 public void Initialise(Scene scene, IConfigSource config)
105 {
106 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
107 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
108 }
109
110 public void AddRegion(Scene scene)
111 { 103 {
112 if (m_scene == null) 104 if (m_scene == null)
113 { 105 {
114 m_scene = scene; 106 m_scene = scene;
115 } 107 }
108
109 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
110 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
116 } 111 }
117 112
118 public Type ReplaceableInterface 113 public void PostInitialise()
119 {
120 get { return null; }
121 }
122
123 public void RegionLoaded(Scene scene)
124 { 114 {
125 m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>(); 115 m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
126 if (m_textureManager != null) 116 if (m_textureManager != null)
@@ -129,14 +119,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
129 } 119 }
130 } 120 }
131 121
132 public void RemoveRegion(Scene scene)
133 {
134 }
135
136 public void PostInitialise()
137 {
138 }
139
140 public void Close() 122 public void Close()
141 { 123 {
142 } 124 }
@@ -146,6 +128,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
146 get { return m_name; } 128 get { return m_name; }
147 } 129 }
148 130
131 public bool IsSharedModule
132 {
133 get { return true; }
134 }
135
149 #endregion 136 #endregion
150 137
151 private void MakeHttpRequest(string url, UUID requestID) 138 private void MakeHttpRequest(string url, UUID requestID)
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 71b01a1..d57a8e5 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -31,7 +31,6 @@ using System.Drawing.Imaging;
31using System.Globalization; 31using System.Globalization;
32using System.IO; 32using System.IO;
33using System.Net; 33using System.Net;
34using Mono.Addins;
35using Nini.Config; 34using Nini.Config;
36using OpenMetaverse; 35using OpenMetaverse;
37using OpenMetaverse.Imaging; 36using OpenMetaverse.Imaging;
@@ -44,8 +43,7 @@ using System.Reflection;
44 43
45namespace OpenSim.Region.CoreModules.Scripting.VectorRender 44namespace OpenSim.Region.CoreModules.Scripting.VectorRender
46{ 45{
47 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 46 public class VectorRenderModule : IRegionModule, IDynamicTextureRender
48 public class VectorRenderModule : ISharedRegionModule, IDynamicTextureRender
49 { 47 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 49
@@ -112,10 +110,15 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
112 110
113 #endregion 111 #endregion
114 112
115 #region ISharedRegionModule Members 113 #region IRegionModule Members
116 114
117 public void Initialise(IConfigSource config) 115 public void Initialise(Scene scene, IConfigSource config)
118 { 116 {
117 if (m_scene == null)
118 {
119 m_scene = scene;
120 }
121
119 if (m_graph == null) 122 if (m_graph == null)
120 { 123 {
121 Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb); 124 Bitmap bitmap = new Bitmap(1024, 1024, PixelFormat.Format32bppArgb);
@@ -130,20 +133,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
130 m_log.DebugFormat("[VECTORRENDERMODULE]: using font \"{0}\" for text rendering.", m_fontName); 133 m_log.DebugFormat("[VECTORRENDERMODULE]: using font \"{0}\" for text rendering.", m_fontName);
131 } 134 }
132 135
133 public void AddRegion(Scene scene) 136 public void PostInitialise()
134 {
135 if (m_scene == null)
136 {
137 m_scene = scene;
138 }
139 }
140
141 public Type ReplaceableInterface
142 {
143 get { return null; }
144 }
145
146 public void RegionLoaded(Scene scene)
147 { 137 {
148 m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>(); 138 m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>();
149 if (m_textureManager != null) 139 if (m_textureManager != null)
@@ -152,14 +142,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
152 } 142 }
153 } 143 }
154 144
155 public void RemoveRegion(Scene scene)
156 {
157 }
158
159 public void PostInitialise()
160 {
161 }
162
163 public void Close() 145 public void Close()
164 { 146 {
165 } 147 }
@@ -169,6 +151,11 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
169 get { return m_name; } 151 get { return m_name; }
170 } 152 }
171 153
154 public bool IsSharedModule
155 {
156 get { return true; }
157 }
158
172 #endregion 159 #endregion
173 160
174 private void Draw(string data, UUID id, string extraParams) 161 private void Draw(string data, UUID id, string extraParams)
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 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using Mono.Addins;
32using Nini.Config; 31using Nini.Config;
33using OpenMetaverse; 32using OpenMetaverse;
34using OpenSim.Framework; 33using OpenSim.Framework;
@@ -86,8 +85,7 @@ using OpenSim.Region.Framework.Scenes;
86 85
87namespace OpenSim.Region.CoreModules.Scripting.WorldComm 86namespace 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
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
index a9147fb6..27b64bf 100644
--- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -32,7 +32,6 @@ using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using log4net; 34using log4net;
35using Mono.Addins;
36using Nini.Config; 35using Nini.Config;
37using Nwc.XmlRpc; 36using Nwc.XmlRpc;
38using OpenMetaverse; 37using OpenMetaverse;
@@ -77,8 +76,7 @@ using OpenSim.Region.Framework.Scenes;
77 76
78namespace OpenSim.Region.CoreModules.Scripting.XMLRPC 77namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
79{ 78{
80 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 79 public class XMLRPCModule : IRegionModule, IXMLRPC
81 public class XMLRPCModule : ISharedRegionModule, IXMLRPC
82 { 80 {
83 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 81 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
84 82
@@ -96,9 +94,9 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
96 private int RemoteReplyScriptWait = 300; 94 private int RemoteReplyScriptWait = 300;
97 private object XMLRPCListLock = new object(); 95 private object XMLRPCListLock = new object();
98 96
99 #region ISharedRegionModule Members 97 #region IRegionModule Members
100 98
101 public void Initialise(IConfigSource config) 99 public void Initialise(Scene scene, IConfigSource config)
102 { 100 {
103 // We need to create these early because the scripts might be calling 101 // We need to create these early because the scripts might be calling
104 // But since this gets called for every region, we need to make sure they 102 // But since this gets called for every region, we need to make sure they
@@ -118,14 +116,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
118 { 116 {
119 } 117 }
120 } 118 }
121 }
122
123 public void PostInitialise()
124 {
125 }
126 119
127 public void AddRegion(Scene scene)
128 {
129 if (!m_scenes.Contains(scene)) 120 if (!m_scenes.Contains(scene))
130 { 121 {
131 m_scenes.Add(scene); 122 m_scenes.Add(scene);
@@ -134,12 +125,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
134 } 125 }
135 } 126 }
136 127
137 public Type ReplaceableInterface 128 public void PostInitialise()
138 {
139 get { return null; }
140 }
141 private Dictionary<Scene, BaseHttpServer> m_HttpServers = new Dictionary<Scene, BaseHttpServer>();
142 public void RegionLoaded(Scene scene)
143 { 129 {
144 if (IsEnabled()) 130 if (IsEnabled())
145 { 131 {
@@ -147,31 +133,9 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
147 // Attach xmlrpc handlers 133 // Attach xmlrpc handlers
148 m_log.Info("[REMOTE_DATA]: " + 134 m_log.Info("[REMOTE_DATA]: " +
149 "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); 135 "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
150 BaseHttpServer httpServer = new BaseHttpServer((uint)m_remoteDataPort); 136 BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort);
151 httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); 137 httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
152 httpServer.Start(); 138 httpServer.Start();
153 m_HttpServers.Add(scene, httpServer);
154 }
155 }
156
157 public void RemoveRegion(Scene scene)
158 {
159 if (m_scenes.Contains(scene))
160 m_scenes.Remove(scene);
161 scene.UnregisterModuleInterface<IXMLRPC>(this);
162 if (IsEnabled())
163 {
164 // Start http server
165 // Attach xmlrpc handlers
166 if (m_HttpServers.ContainsKey(scene))
167 {
168 BaseHttpServer httpServer;
169 m_HttpServers.TryGetValue(scene, out httpServer);
170 m_log.Info("[REMOTE_DATA]: " +
171 "Stopping XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
172 httpServer.RemoveXmlRPCHandler("llRemoteData");
173 httpServer.Stop();
174 }
175 } 139 }
176 } 140 }
177 141
@@ -184,6 +148,11 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
184 get { return m_name; } 148 get { return m_name; }
185 } 149 }
186 150
151 public bool IsSharedModule
152 {
153 get { return true; }
154 }
155
187 public int Port 156 public int Port
188 { 157 {
189 get { return m_remoteDataPort; } 158 get { return m_remoteDataPort; }