aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs30
1 files changed, 10 insertions, 20 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs
index 4d39345..32659c8 100644
--- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs
@@ -29,7 +29,6 @@ using System;
29using System.Reflection; 29using System.Reflection;
30 30
31using log4net; 31using log4net;
32using Mono.Addins;
33using Nini.Config; 32using Nini.Config;
34using OpenMetaverse; 33using OpenMetaverse;
35 34
@@ -40,12 +39,11 @@ using OpenSim.Region.Framework.Scenes;
40 39
41namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule 40namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
42{ 41{
43 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 42 public class XmlRpcRouter : IRegionModule, IXmlRpcRouter
44 public class XmlRpcRouter : INonSharedRegionModule, IXmlRpcRouter
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 private bool m_enabled = false; 45
48 public void Initialise(IConfigSource config) 46 public void Initialise(Scene scene, IConfigSource config)
49 { 47 {
50 IConfig startupConfig = config.Configs["Startup"]; 48 IConfig startupConfig = config.Configs["Startup"];
51 if (startupConfig == null) 49 if (startupConfig == null)
@@ -54,25 +52,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
54 if (startupConfig.GetString("XmlRpcRouterModule", 52 if (startupConfig.GetString("XmlRpcRouterModule",
55 "XmlRpcRouterModule") == "XmlRpcRouterModule") 53 "XmlRpcRouterModule") == "XmlRpcRouterModule")
56 { 54 {
57 m_enabled = true; 55 scene.RegisterModuleInterface<IXmlRpcRouter>(this);
58 } 56 }
59 } 57 }
60 public void AddRegion(Scene scene)
61 {
62 scene.RegisterModuleInterface<IXmlRpcRouter>(this);
63 }
64 public void RegionLoaded(Scene scene)
65 {
66 }
67
68 public void RemoveRegion(Scene scene)
69 {
70 scene.UnregisterModuleInterface<IXmlRpcRouter>(this);
71 }
72 58
73 public Type ReplaceableInterface 59 public void PostInitialise()
74 { 60 {
75 get { return null; }
76 } 61 }
77 62
78 public void Close() 63 public void Close()
@@ -84,6 +69,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
84 get { return "XmlRpcRouterModule"; } 69 get { return "XmlRpcRouterModule"; }
85 } 70 }
86 71
72 public bool IsSharedModule
73 {
74 get { return false; }
75 }
76
87 public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) 77 public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
88 { 78 {
89 scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri}); 79 scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri});