From 07a94fdf89e88e88513c61f7f67544e49ddcd9eb Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Sun, 31 May 2009 11:50:42 +0000 Subject: 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. --- .../OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 9e3e1c7..5c8bfc6 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; 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); @@ -19,7 +19,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView public void Initialise(Scene scene, IConfigSource source) { - if (source.Configs.Contains("IRCd") && + if (null != source.Configs["IRCd"] && source.Configs["IRCd"].GetBoolean("Enabled",false)) { m_scene = scene; @@ -48,7 +48,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView public void Close() { - + } public string Name -- cgit v1.1