diff options
author | Revolution | 2010-01-22 18:09:33 -0600 |
---|---|---|
committer | Melanie | 2010-01-23 15:18:52 +0000 |
commit | ec3c31e61e5e540f822891110df9bc978655bbaf (patch) | |
tree | b0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Client/MXP | |
parent | add a target position to agent updates to ScenePresence to support alternativ... (diff) | |
download | opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.zip opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2 opensim-SC_OLD-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz |
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Client/MXP')
-rw-r--r-- | OpenSim/Client/MXP/MXPModule.cs | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/OpenSim/Client/MXP/MXPModule.cs b/OpenSim/Client/MXP/MXPModule.cs index 0b442cc..47417ab 100644 --- a/OpenSim/Client/MXP/MXPModule.cs +++ b/OpenSim/Client/MXP/MXPModule.cs | |||
@@ -31,6 +31,7 @@ using System.Reflection; | |||
31 | using System.Text; | 31 | using System.Text; |
32 | using System.Timers; | 32 | using System.Timers; |
33 | using log4net; | 33 | using log4net; |
34 | using Mono.Addins; | ||
34 | using MXP; | 35 | using MXP; |
35 | using Nini.Config; | 36 | using Nini.Config; |
36 | using OpenMetaverse; | 37 | using OpenMetaverse; |
@@ -44,7 +45,8 @@ namespace OpenSim.Client.MXP | |||
44 | /** | 45 | /** |
45 | * MXP Client Module which adds MXP support to client / region communication. | 46 | * MXP Client Module which adds MXP support to client / region communication. |
46 | */ | 47 | */ |
47 | public class MXPModule : IRegionModule | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
49 | public class MXPModule : ISharedRegionModule | ||
48 | { | 50 | { |
49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 52 | ||
@@ -57,15 +59,23 @@ namespace OpenSim.Client.MXP | |||
57 | private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); | 59 | private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); |
58 | private bool m_shutdown; | 60 | private bool m_shutdown; |
59 | 61 | ||
60 | public void Initialise(Scene scene, IConfigSource source) | 62 | public void Initialise(IConfigSource source) |
63 | { | ||
64 | m_config = source; | ||
65 | } | ||
66 | |||
67 | public Type ReplaceableInterface | ||
68 | { | ||
69 | get { return null; } | ||
70 | } | ||
71 | |||
72 | public void AddRegion(Scene scene) | ||
61 | { | 73 | { |
62 | if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID)) | 74 | if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID)) |
63 | m_scenes.Add(scene.RegionInfo.RegionID, scene); | 75 | m_scenes.Add(scene.RegionInfo.RegionID, scene); |
64 | |||
65 | m_config = source; | ||
66 | } | 76 | } |
67 | 77 | ||
68 | public void PostInitialise() | 78 | public void RegionLoaded(Scene scene) |
69 | { | 79 | { |
70 | if (m_config.Configs["MXP"] != null) | 80 | if (m_config.Configs["MXP"] != null) |
71 | { | 81 | { |
@@ -76,7 +86,7 @@ namespace OpenSim.Client.MXP | |||
76 | 86 | ||
77 | m_port = con.GetInt("Port", m_port); | 87 | m_port = con.GetInt("Port", m_port); |
78 | 88 | ||
79 | m_server = new MXPPacketServer(m_port, m_scenes,m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate",true)); | 89 | m_server = new MXPPacketServer(m_port, m_scenes, m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate", true)); |
80 | 90 | ||
81 | m_ticker = new Timer(100); | 91 | m_ticker = new Timer(100); |
82 | m_ticker.AutoReset = false; | 92 | m_ticker.AutoReset = false; |
@@ -89,6 +99,14 @@ namespace OpenSim.Client.MXP | |||
89 | } | 99 | } |
90 | } | 100 | } |
91 | 101 | ||
102 | public void RemoveRegion(Scene scene) | ||
103 | { | ||
104 | } | ||
105 | |||
106 | public void PostInitialise() | ||
107 | { | ||
108 | } | ||
109 | |||
92 | void ticker_Elapsed(object sender, ElapsedEventArgs e) | 110 | void ticker_Elapsed(object sender, ElapsedEventArgs e) |
93 | { | 111 | { |
94 | try | 112 | try |
@@ -121,11 +139,5 @@ namespace OpenSim.Client.MXP | |||
121 | { | 139 | { |
122 | get { return "MXP ClientStack Module"; } | 140 | get { return "MXP ClientStack Module"; } |
123 | } | 141 | } |
124 | |||
125 | public bool IsSharedModule | ||
126 | { | ||
127 | get { return true; } | ||
128 | } | ||
129 | |||
130 | } | 142 | } |
131 | } | 143 | } |