aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Agent
diff options
context:
space:
mode:
authorRevolution2010-01-22 18:09:33 -0600
committerMelanie2010-01-23 15:18:52 +0000
commitec3c31e61e5e540f822891110df9bc978655bbaf (patch)
treeb0b34a239eab48e163a3ca064edcd7567948423c /OpenSim/Region/OptionalModules/Agent
parentadd a target position to agent updates to ScenePresence to support alternativ... (diff)
downloadopensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.zip
opensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.gz
opensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.bz2
opensim-SC-ec3c31e61e5e540f822891110df9bc978655bbaf.tar.xz
Updates all IRegionModules to the new style region modules.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/OptionalModules/Agent')
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs32
1 files changed, 22 insertions, 10 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs
index cfe1278..ec040db 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs
@@ -25,9 +25,11 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
28using System.Net; 29using System.Net;
29using System.Reflection; 30using System.Reflection;
30using log4net; 31using log4net;
32using Mono.Addins;
31using Nini.Config; 33using Nini.Config;
32using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
@@ -35,24 +37,23 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
35 37
36namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView 38namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
37{ 39{
38 public class IRCStackModule : IRegionModule 40 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
41 public class IRCStackModule : INonSharedRegionModule
39 { 42 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 44
42 private IRCServer m_server; 45 private IRCServer m_server;
43// private Scene m_scene; 46// private Scene m_scene;
47 private int portNo;
44 48
45 #region Implementation of IRegionModule 49 #region Implementation of ISharedRegionModule
46 50
47 public void Initialise(Scene scene, IConfigSource source) 51 public void Initialise(IConfigSource source)
48 { 52 {
49 if (null != source.Configs["IRCd"] && 53 if (null != source.Configs["IRCd"] &&
50 source.Configs["IRCd"].GetBoolean("Enabled",false)) 54 source.Configs["IRCd"].GetBoolean("Enabled",false))
51 { 55 {
52 int portNo = source.Configs["IRCd"].GetInt("Port",6666); 56 portNo = source.Configs["IRCd"].GetInt("Port",6666);
53// m_scene = scene;
54 m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene);
55 m_server.OnNewIRCClient += m_server_OnNewIRCClient;
56 } 57 }
57 } 58 }
58 59
@@ -68,9 +69,20 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
68 m_log.Info("[IRCd] Added user to Scene"); 69 m_log.Info("[IRCd] Added user to Scene");
69 } 70 }
70 71
71 public void PostInitialise() 72 public void AddRegion(Scene scene)
73 {
74 if (portNo != null)
75 {
76 m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene);
77 m_server.OnNewIRCClient += m_server_OnNewIRCClient;
78 }
79 }
80 public void RegionLoaded(Scene scene)
72 { 81 {
82 }
73 83
84 public void RemoveRegion(Scene scene)
85 {
74 } 86 }
75 87
76 public void Close() 88 public void Close()
@@ -83,9 +95,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
83 get { return "IRCClientStackModule"; } 95 get { return "IRCClientStackModule"; }
84 } 96 }
85 97
86 public bool IsSharedModule 98 public Type ReplaceableInterface
87 { 99 {
88 get { return false; } 100 get { return null; }
89 } 101 }
90 102
91 #endregion 103 #endregion