diff options
author | Sean McNamara | 2011-02-19 22:29:45 -0500 |
---|---|---|
committer | Sean McNamara | 2011-02-19 22:29:45 -0500 |
commit | 06a4810d210fcbfe1a859317698f791129ecdaf1 (patch) | |
tree | f53a34060b74628fbfc4cebacb3787f74bcad77d | |
parent | Add [Modules] option for unconditionally disabling entire module globally (fo... (diff) | |
download | opensim-SC_OLD-06a4810d210fcbfe1a859317698f791129ecdaf1.zip opensim-SC_OLD-06a4810d210fcbfe1a859317698f791129ecdaf1.tar.gz opensim-SC_OLD-06a4810d210fcbfe1a859317698f791129ecdaf1.tar.bz2 opensim-SC_OLD-06a4810d210fcbfe1a859317698f791129ecdaf1.tar.xz |
Fix config source by taking it from Initialize
-rw-r--r-- | OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs index 7593b95..68cf219 100644 --- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs +++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs | |||
@@ -169,6 +169,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup | |||
169 | readonly Dictionary<IScene, AutoBackupModuleState> states = new Dictionary<IScene, AutoBackupModuleState>(4); | 169 | readonly Dictionary<IScene, AutoBackupModuleState> states = new Dictionary<IScene, AutoBackupModuleState>(4); |
170 | readonly Dictionary<double, Timer> timers = new Dictionary<double, Timer>(1); | 170 | readonly Dictionary<double, Timer> timers = new Dictionary<double, Timer>(1); |
171 | readonly Dictionary<Timer, List<IScene>> timerMap = new Dictionary<Timer, List<IScene>>(1); | 171 | readonly Dictionary<Timer, List<IScene>> timerMap = new Dictionary<Timer, List<IScene>>(1); |
172 | private IConfigSource m_configSource = null; | ||
172 | private bool m_Enabled = false; //Whether the shared module should be enabled at all. NOT the same as m_Enabled in AutoBackupModuleState! | 173 | private bool m_Enabled = false; //Whether the shared module should be enabled at all. NOT the same as m_Enabled in AutoBackupModuleState! |
173 | 174 | ||
174 | public AutoBackupModule () | 175 | public AutoBackupModule () |
@@ -180,6 +181,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup | |||
180 | void IRegionModuleBase.Initialise (Nini.Config.IConfigSource source) | 181 | void IRegionModuleBase.Initialise (Nini.Config.IConfigSource source) |
181 | { | 182 | { |
182 | //Determine if we have been enabled at all in OpenSim.ini -- this is part and parcel of being an optional module | 183 | //Determine if we have been enabled at all in OpenSim.ini -- this is part and parcel of being an optional module |
184 | m_configSource = source; | ||
183 | IConfig moduleConfig = source.Configs["Modules"]; | 185 | IConfig moduleConfig = source.Configs["Modules"]; |
184 | if (moduleConfig != null) | 186 | if (moduleConfig != null) |
185 | { | 187 | { |
@@ -236,7 +238,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup | |||
236 | states.Add(scene, st); | 238 | states.Add(scene, st); |
237 | 239 | ||
238 | //Read the config settings and set variables. | 240 | //Read the config settings and set variables. |
239 | IConfig config = scene.Config.Configs[scene.RegionInfo.RegionName]; | 241 | IConfig config = m_configSource.Configs[scene.RegionInfo.RegionName]; |
240 | st.SetEnabled(config.GetBoolean("AutoBackup", false)); | 242 | st.SetEnabled(config.GetBoolean("AutoBackup", false)); |
241 | if(!st.GetEnabled()) //If you don't want AutoBackup, we stop. | 243 | if(!st.GetEnabled()) //If you don't want AutoBackup, we stop. |
242 | return; | 244 | return; |