aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Client')
-rw-r--r--OpenSim/Client/MXP/MXPModule.cs36
1 files changed, 12 insertions, 24 deletions
diff --git a/OpenSim/Client/MXP/MXPModule.cs b/OpenSim/Client/MXP/MXPModule.cs
index 47417ab..0b442cc 100644
--- a/OpenSim/Client/MXP/MXPModule.cs
+++ b/OpenSim/Client/MXP/MXPModule.cs
@@ -31,7 +31,6 @@ using System.Reflection;
31using System.Text; 31using System.Text;
32using System.Timers; 32using System.Timers;
33using log4net; 33using log4net;
34using Mono.Addins;
35using MXP; 34using MXP;
36using Nini.Config; 35using Nini.Config;
37using OpenMetaverse; 36using OpenMetaverse;
@@ -45,8 +44,7 @@ namespace OpenSim.Client.MXP
45 /** 44 /**
46 * MXP Client Module which adds MXP support to client / region communication. 45 * MXP Client Module which adds MXP support to client / region communication.
47 */ 46 */
48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 47 public class MXPModule : IRegionModule
49 public class MXPModule : ISharedRegionModule
50 { 48 {
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 50
@@ -59,23 +57,15 @@ namespace OpenSim.Client.MXP
59 private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 57 private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
60 private bool m_shutdown; 58 private bool m_shutdown;
61 59
62 public void Initialise(IConfigSource source) 60 public void Initialise(Scene scene, 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)
73 { 61 {
74 if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID)) 62 if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID))
75 m_scenes.Add(scene.RegionInfo.RegionID, scene); 63 m_scenes.Add(scene.RegionInfo.RegionID, scene);
64
65 m_config = source;
76 } 66 }
77 67
78 public void RegionLoaded(Scene scene) 68 public void PostInitialise()
79 { 69 {
80 if (m_config.Configs["MXP"] != null) 70 if (m_config.Configs["MXP"] != null)
81 { 71 {
@@ -86,7 +76,7 @@ namespace OpenSim.Client.MXP
86 76
87 m_port = con.GetInt("Port", m_port); 77 m_port = con.GetInt("Port", m_port);
88 78
89 m_server = new MXPPacketServer(m_port, m_scenes, m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate", true)); 79 m_server = new MXPPacketServer(m_port, m_scenes,m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate",true));
90 80
91 m_ticker = new Timer(100); 81 m_ticker = new Timer(100);
92 m_ticker.AutoReset = false; 82 m_ticker.AutoReset = false;
@@ -99,14 +89,6 @@ namespace OpenSim.Client.MXP
99 } 89 }
100 } 90 }
101 91
102 public void RemoveRegion(Scene scene)
103 {
104 }
105
106 public void PostInitialise()
107 {
108 }
109
110 void ticker_Elapsed(object sender, ElapsedEventArgs e) 92 void ticker_Elapsed(object sender, ElapsedEventArgs e)
111 { 93 {
112 try 94 try
@@ -139,5 +121,11 @@ namespace OpenSim.Client.MXP
139 { 121 {
140 get { return "MXP ClientStack Module"; } 122 get { return "MXP ClientStack Module"; }
141 } 123 }
124
125 public bool IsSharedModule
126 {
127 get { return true; }
128 }
129
142 } 130 }
143} 131}