Fix config source stuff harder (debug console prints only; no fix yet)

bulletsim
Sean McNamara 2011-02-19 22:47:05 -05:00
parent 06a4810d21
commit 3c9bf5c476
1 changed files with 11 additions and 0 deletions

View File

@ -234,11 +234,22 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
if(scene == null) if(scene == null)
return; return;
m_log.Info("[AUTO BACKUP MODULE]: RegionLoaded for region: " + scene.RegionInfo.RegionName);
AutoBackupModuleState st = new AutoBackupModuleState(scene); AutoBackupModuleState st = new AutoBackupModuleState(scene);
states.Add(scene, st); states.Add(scene, st);
//Read the config settings and set variables. //Read the config settings and set variables.
IConfig config = m_configSource.Configs[scene.RegionInfo.RegionName]; IConfig config = m_configSource.Configs[scene.RegionInfo.RegionName];
if(config == null)
{
m_log.Warn("[AUTO BACKUP MODULE]: Can't get config settings! Here are the IConfigs available:");
foreach(IConfig c in m_configSource.Configs)
{
m_log.Warn("[AUTO BACKUP MODULE]: " + c.Name);
}
throw new NullReferenceException("This is debug code");
}
st.SetEnabled(config.GetBoolean("AutoBackup", false)); st.SetEnabled(config.GetBoolean("AutoBackup", false));
if(!st.GetEnabled()) //If you don't want AutoBackup, we stop. if(!st.GetEnabled()) //If you don't want AutoBackup, we stop.
return; return;