aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDr Scofield2008-05-27 12:24:29 +0000
committerDr Scofield2008-05-27 12:24:29 +0000
commit34f1741866a2791febb1c6dad5e8482447c222be (patch)
treeeb70ce8c2d9abdb1ad8dd32e6f178fdc9202aafc
parentupdating URL for LSL status. (diff)
downloadopensim-SC_OLD-34f1741866a2791febb1c6dad5e8482447c222be.zip
opensim-SC_OLD-34f1741866a2791febb1c6dad5e8482447c222be.tar.gz
opensim-SC_OLD-34f1741866a2791febb1c6dad5e8482447c222be.tar.bz2
opensim-SC_OLD-34f1741866a2791febb1c6dad5e8482447c222be.tar.xz
cleaning up: coding style guidelines violation in RestPlugin.cs.
adding support for enabled = true|false for IRCBridgeModule
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs3
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs23
2 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
index c502e28..9855658 100644
--- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
+++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
@@ -194,7 +194,8 @@ namespace OpenSim.ApplicationPlugins.Rest
194 194
195 try 195 try
196 { 196 {
197 if ((_config = openSim.ConfigSource.Configs["RestPlugins"]) == null) { 197 if ((_config = openSim.ConfigSource.Configs["RestPlugins"]) == null)
198 {
198 m_log.WarnFormat("{0} Rest Plugins not configured", MsgID); 199 m_log.WarnFormat("{0} Rest Plugins not configured", MsgID);
199 return; 200 return;
200 } 201 }
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index a31d620..156c2fd 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -60,12 +60,35 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
60 internal object m_syncInit = new object(); 60 internal object m_syncInit = new object();
61 internal object m_syncLogout = new object(); 61 internal object m_syncLogout = new object();
62 62
63 private IConfig m_config;
64
63 #region IRegionModule Members 65 #region IRegionModule Members
64 66
65 public void Initialise(Scene scene, IConfigSource config) 67 public void Initialise(Scene scene, IConfigSource config)
66 { 68 {
69 try
70 {
71 if ((m_config = config.Configs["IRC"]) == null)
72 {
73 m_log.InfoFormat("[IRC] module not configured");
74 return;
75 }
76
77 if (!m_config.GetBoolean("enabled", false))
78 {
79 m_log.InfoFormat("[IRC] module disabled in configuration");
80 return;
81 }
82 }
83 catch (Exception)
84 {
85 m_log.Info("[IRC] module not configured");
86 return;
87 }
88
67 lock (m_syncInit) 89 lock (m_syncInit)
68 { 90 {
91
69 if (!m_scenes.Contains(scene)) 92 if (!m_scenes.Contains(scene))
70 { 93 {
71 m_scenes.Add(scene); 94 m_scenes.Add(scene);