From 246443773ae52420092b483603d0e1daf9b87f00 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 1 Oct 2011 00:15:30 +0100 Subject: minor: remove clutter null check from pass in config to AvatarFactoryModule.Initialize() This is never null --- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 13 +++++-------- OpenSim/Region/Framework/Interfaces/IRegionModule.cs | 9 +++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 0cadd83..d4e1736 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -64,15 +64,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory scene.RegisterModuleInterface(this); scene.EventManager.OnNewClient += NewClient; - if (config != null) + IConfig sconfig = config.Configs["Startup"]; + if (sconfig != null) { - IConfig sconfig = config.Configs["Startup"]; - if (sconfig != null) - { - m_savetime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); - m_sendtime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); - // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); - } + m_savetime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSave",Convert.ToString(m_savetime))); + m_sendtime = Convert.ToInt32(sconfig.GetString("DelayBeforeAppearanceSend",Convert.ToString(m_sendtime))); + // m_log.InfoFormat("[AVFACTORY] configured for {0} save and {1} send",m_savetime,m_sendtime); } if (m_scene == null) diff --git a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs index e25a6e8..2bb0c75 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionModule.cs @@ -35,7 +35,16 @@ namespace OpenSim.Region.Framework.Interfaces /// public interface IRegionModule { + /// + /// Initialize the module. + /// + /// + /// For a shared module this can be called multiple times - once per scene. + /// + /// + /// Configuration information. For a shared module this will be identical on every scene call void Initialise(Scene scene, IConfigSource source); + void PostInitialise(); void Close(); string Name { get; } -- cgit v1.1