package config;

import heufybot.core.Logger;
import heufybot.utils.FileUtils;

import java.util.HashMap;

import org.yaml.snakeyaml.Yaml;

public class ServerConfig extends GlobalConfig
{
	@SuppressWarnings("unchecked")
	public void loadServerConfig(String fileName, HashMap<String, Object> globalSettings)
	{
		this.settings = globalSettings;
		if(fileName == null)
		{
			Logger.error("Config", "No seperate server configs found. Using the settings from the global config instead.");
			return;
		}
		
		Yaml yaml = new Yaml();
		String settingsYaml = FileUtils.readFile(fileName);
		HashMap<String, Object> serverSettings = (HashMap<String, Object>) yaml.load(settingsYaml);
		
		for(String setting : serverSettings.keySet())
		{
			settings.put(setting, serverSettings.get(setting));
		}
	}
}
@@ -321,16 +321,42 @@
 ttings =
+ (HashMap%3CString, Object%3E)
  globalS
@@ -362,16 +362,24 @@
 Settings
+.clone()
 ;%0A%09%09if(f

Stop the server configs from overwriting the global one