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