diff options
author | Adam Frisby | 2009-05-30 07:02:38 +0000 |
---|---|---|
committer | Adam Frisby | 2009-05-30 07:02:38 +0000 |
commit | 449e167dce37f49a31564496458a9690c8b1956d (patch) | |
tree | 6ef0d4d27767bdb65fe8bfbbc176c67011e24bc1 /OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | |
parent | * More Tweaks (diff) | |
download | opensim-SC-449e167dce37f49a31564496458a9690c8b1956d.zip opensim-SC-449e167dce37f49a31564496458a9690c8b1956d.tar.gz opensim-SC-449e167dce37f49a31564496458a9690c8b1956d.tar.bz2 opensim-SC-449e167dce37f49a31564496458a9690c8b1956d.tar.xz |
* You are likely to be eaten by a grue.
* Enable with [IRCd] Enabled=true (will listen on port 6666).
Diffstat (limited to 'OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index c807d7f..9e3e1c7 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | |||
@@ -8,7 +8,7 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; | |||
8 | 8 | ||
9 | namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView | 9 | namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView |
10 | { | 10 | { |
11 | class IRCStackModule : IRegionModule | 11 | public class IRCStackModule : IRegionModule |
12 | { | 12 | { |
13 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 13 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
14 | 14 | ||
@@ -19,16 +19,25 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView | |||
19 | 19 | ||
20 | public void Initialise(Scene scene, IConfigSource source) | 20 | public void Initialise(Scene scene, IConfigSource source) |
21 | { | 21 | { |
22 | m_scene = scene; | 22 | if (source.Configs.Contains("IRCd") && |
23 | m_server = new IRCServer(IPAddress.Parse("0.0.0.0"),6666, scene); | 23 | source.Configs["IRCd"].GetBoolean("Enabled",false)) |
24 | m_server.OnNewIRCClient += m_server_OnNewIRCClient; | 24 | { |
25 | m_scene = scene; | ||
26 | m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene); | ||
27 | m_server.OnNewIRCClient += m_server_OnNewIRCClient; | ||
28 | } | ||
25 | } | 29 | } |
26 | 30 | ||
27 | void m_server_OnNewIRCClient(IRCClientView user) | 31 | void m_server_OnNewIRCClient(IRCClientView user) |
28 | { | 32 | { |
33 | user.OnIRCReady += user_OnIRCReady; | ||
34 | } | ||
35 | |||
36 | void user_OnIRCReady(IRCClientView cv) | ||
37 | { | ||
29 | m_log.Info("[IRCd] Adding user..."); | 38 | m_log.Info("[IRCd] Adding user..."); |
30 | m_scene.ClientManager.Add(user.CircuitCode, user); | 39 | m_scene.ClientManager.Add(cv.CircuitCode, cv); |
31 | user.Start(); | 40 | cv.Start(); |
32 | m_log.Info("[IRCd] Added user to Scene"); | 41 | m_log.Info("[IRCd] Added user to Scene"); |
33 | } | 42 | } |
34 | 43 | ||