diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index d78931a..e331b8d 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -31,6 +31,7 @@ using System.IO; | |||
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Text; | 32 | using System.Text; |
33 | using System.Threading; | 33 | using System.Threading; |
34 | using Mono.Addins; | ||
34 | using Nini.Config; | 35 | using Nini.Config; |
35 | using OpenMetaverse; | 36 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
@@ -84,7 +85,8 @@ using OpenSim.Region.Framework.Scenes; | |||
84 | 85 | ||
85 | namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | 86 | namespace OpenSim.Region.CoreModules.Scripting.HttpRequest |
86 | { | 87 | { |
87 | public class HttpRequestModule : IRegionModule, IHttpRequestModule | 88 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
89 | public class HttpRequestModule : ISharedRegionModule, IHttpRequestModule | ||
88 | { | 90 | { |
89 | private object HttpListLock = new object(); | 91 | private object HttpListLock = new object(); |
90 | private int httpTimeout = 30000; | 92 | private int httpTimeout = 30000; |
@@ -229,18 +231,35 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
229 | 231 | ||
230 | #endregion | 232 | #endregion |
231 | 233 | ||
232 | #region IRegionModule Members | 234 | #region ISharedRegionModule Members |
233 | 235 | ||
234 | public void Initialise(Scene scene, IConfigSource config) | 236 | public void Initialise(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) | ||
235 | { | 245 | { |
236 | m_scene = scene; | 246 | m_scene = scene; |
237 | 247 | ||
238 | m_scene.RegisterModuleInterface<IHttpRequestModule>(this); | 248 | m_scene.RegisterModuleInterface<IHttpRequestModule>(this); |
249 | } | ||
250 | |||
251 | public Type ReplaceableInterface | ||
252 | { | ||
253 | get { return null; } | ||
254 | } | ||
239 | 255 | ||
240 | m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); | 256 | public void RegionLoaded(Scene scene) |
241 | m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); | 257 | { |
258 | } | ||
242 | 259 | ||
243 | m_pendingRequests = new Dictionary<UUID, HttpRequestClass>(); | 260 | public void RemoveRegion(Scene scene) |
261 | { | ||
262 | scene.UnregisterModuleInterface<IHttpRequestModule>(this); | ||
244 | } | 263 | } |
245 | 264 | ||
246 | public void PostInitialise() | 265 | public void PostInitialise() |
@@ -256,11 +275,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
256 | get { return m_name; } | 275 | get { return m_name; } |
257 | } | 276 | } |
258 | 277 | ||
259 | public bool IsSharedModule | ||
260 | { | ||
261 | get { return true; } | ||
262 | } | ||
263 | |||
264 | #endregion | 278 | #endregion |
265 | } | 279 | } |
266 | 280 | ||