diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs | 30 |
2 files changed, 19 insertions, 39 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs index f2a0e53..d18ac0a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs | |||
@@ -30,7 +30,6 @@ using System.Collections.Generic; | |||
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | 31 | ||
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Addins; | ||
34 | using Nini.Config; | 33 | using Nini.Config; |
35 | using OpenMetaverse; | 34 | using OpenMetaverse; |
36 | 35 | ||
@@ -50,8 +49,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
50 | public string uri; | 49 | public string uri; |
51 | } | 50 | } |
52 | 51 | ||
53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 52 | public class XmlRpcGridRouter : IRegionModule, IXmlRpcRouter |
54 | public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter | ||
55 | { | 53 | { |
56 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
57 | 55 | ||
@@ -61,7 +59,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
61 | private bool m_Enabled = false; | 59 | private bool m_Enabled = false; |
62 | private string m_ServerURI = String.Empty; | 60 | private string m_ServerURI = String.Empty; |
63 | 61 | ||
64 | public void Initialise(IConfigSource config) | 62 | public void Initialise(Scene scene, IConfigSource config) |
65 | { | 63 | { |
66 | IConfig startupConfig = config.Configs["Startup"]; | 64 | IConfig startupConfig = config.Configs["Startup"]; |
67 | if (startupConfig == null) | 65 | if (startupConfig == null) |
@@ -77,26 +75,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
77 | return; | 75 | return; |
78 | } | 76 | } |
79 | 77 | ||
78 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); | ||
80 | m_Enabled = true; | 79 | m_Enabled = true; |
81 | } | 80 | } |
82 | } | 81 | } |
83 | 82 | ||
84 | public void AddRegion(Scene scene) | 83 | public void PostInitialise() |
85 | { | 84 | { |
86 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); | ||
87 | } | ||
88 | public void RegionLoaded(Scene scene) | ||
89 | { | ||
90 | } | ||
91 | |||
92 | public void RemoveRegion(Scene scene) | ||
93 | { | ||
94 | scene.UnregisterModuleInterface<IXmlRpcRouter>(this); | ||
95 | } | ||
96 | |||
97 | public Type ReplaceableInterface | ||
98 | { | ||
99 | get { return null; } | ||
100 | } | 85 | } |
101 | 86 | ||
102 | public void Close() | 87 | public void Close() |
@@ -108,6 +93,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule | |||
108 | get { return "XmlRpcGridRouterModule"; } | 93 | get { return "XmlRpcGridRouterModule"; } |
109 | } | 94 | } |
110 | 95 | ||
96 | public bool IsSharedModule | ||
97 | { | ||
98 | get { return false; } | ||
99 | } | ||
100 | |||
111 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) | 101 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) |
112 | { | 102 | { |
113 | if (!m_Channels.ContainsKey(itemID)) | 103 | if (!m_Channels.ContainsKey(itemID)) |
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; | |||
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | 30 | ||
31 | using log4net; | 31 | using log4net; |
32 | using Mono.Addins; | ||
33 | using Nini.Config; | 32 | using Nini.Config; |
34 | using OpenMetaverse; | 33 | using OpenMetaverse; |
35 | 34 | ||
@@ -40,12 +39,11 @@ using OpenSim.Region.Framework.Scenes; | |||
40 | 39 | ||
41 | namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule | 40 | namespace 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}); |