Fix IRCd init check for config section

The IRCStackModule used Nini.Config.ConfigCollection.Contains() to
determine whether the "IRCd" section was present in the config. This
ConfigCollection, however, stores an ArrayList of IConfig objects, not
strings, so calling Contains("IRCd") always returns false since "IRCd"
is a string, not an IConfig object.
0.6.6-post-fixes
Mike Mazur 2009-05-31 11:50:42 +00:00
parent 4927bc60a2
commit 07a94fdf89
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
{ {
public class IRCStackModule : IRegionModule public class IRCStackModule : IRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -19,7 +19,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
public void Initialise(Scene scene, IConfigSource source) public void Initialise(Scene scene, IConfigSource source)
{ {
if (source.Configs.Contains("IRCd") && if (null != source.Configs["IRCd"] &&
source.Configs["IRCd"].GetBoolean("Enabled",false)) source.Configs["IRCd"].GetBoolean("Enabled",false))
{ {
m_scene = scene; m_scene = scene;
@ -48,7 +48,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
public void Close() public void Close()
{ {
} }
public string Name public string Name