public void SaveData() { lock (config.channels) { foreach (config.channel x in config.channels) { infobot_core infobot = (infobot_core)x.RetrieveObject("Infobot"); if (infobot != null) { if (infobot.stored == false) { infobot.stored = true; infobot.Save(); } } } } }