<commit_before>// Copyright (c) 2014, Christopher "blay09" Baker
// All rights reserved.

package net.blay09.mods.eirairc.config;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.blay09.mods.eirairc.handler.ConfigurationHandler;
import net.blay09.mods.eirairc.util.Utils;
import net.minecraft.command.ICommandSender;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;

public class DisplayConfig {

	private static final String CATEGORY = ConfigurationHandler.CATEGORY_DISPLAY;
	
	public static final Map<String, DisplayFormatConfig> displayFormates = new HashMap<String, DisplayFormatConfig>();
	
	public static boolean enableNameColors = true;
	public static String opColor = "red";
	public static String ircColor = "gray";
	public static String emoteColor = "gold";
	public static String quitMessage = "Leaving.";
	public static String displayMode = "S-Light";
	public static String originalDisplayMode;
	public static boolean relayDeathMessages = true;
	public static boolean relayMinecraftJoinLeave = true;
	public static boolean relayIRCJoinLeave = true;
	public static boolean relayNickChanges = true;
	public static boolean hudRecState = true;
	public static String botProfile = "Custom";
	public static boolean vanillaChat = false;
	
	public static void load(Configuration config) {
		displayMode = Utils.unquote(config.get(CATEGORY, "displayMode", displayMode).getString());
		ircColor = config.get(CATEGORY, "ircColor", ircColor).getString();
		emoteColor = config.get(CATEGORY, "emoteColor", emoteColor).getString();
		relayDeathMessages = config.get(CATEGORY, "relayDeathMessages", relayDeathMessages).getBoolean(relayDeathMessages);
		relayMinecraftJoinLeave = config.get(CATEGORY, "relayMinecraftJoinLeave", relayMinecraftJoinLeave).getBoolean(relayMinecraftJoinLeave);
		relayIRCJoinLeave = config.get(CATEGORY, "relayIRCJoinLeave", relayIRCJoinLeave).getBoolean(relayIRCJoinLeave);
		relayNickChanges = config.get(CATEGORY, "relayNickChanges", relayNickChanges).getBoolean(relayNickChanges);
		opColor = config.get(CATEGORY, "opColor", opColor).getString();
		enableNameColors = config.get(CATEGORY, "enableNameColors", enableNameColors).getBoolean(enableNameColors);
		hudRecState = config.get(CATEGORY, "hudRecState", hudRecState).getBoolean(hudRecState);
		vanillaChat = config.get(CATEGORY, "vanillaChat", vanillaChat).getBoolean(vanillaChat);
		
		ConfigCategory displayFormatCategory = config.getCategory(CATEGORY + Configuration.CATEGORY_SPLITTER + ConfigurationHandler.CATEGORY_FORMATS);
		DisplayFormatConfig.defaultConfig(config, displayFormatCategory);
		for(ConfigCategory category : displayFormatCategory.getChildren()) {<commit_msg>Blay, please learn to use branches properly.<commit_after>// Copyright (c) 2014, Christopher "blay09" Baker
// All rights reserved.

package net.blay09.mods.eirairc.config;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.blay09.mods.eirairc.handler.ConfigurationHandler;
import net.blay09.mods.eirairc.util.Utils;
import net.minecraft.command.ICommandSender;
import net.minecraftforge.common.config.ConfigCategory;
import net.minecraftforge.common.config.Configuration;

public class DisplayConfig {

	private static final String CATEGORY = ConfigurationHandler.CATEGORY_DISPLAY;
	
	public static final Map<String, DisplayFormatConfig> displayFormates = new HashMap<String, DisplayFormatConfig>();
	
	public static boolean enableNameColors = true;
	public static String opColor = "red";
	public static String ircColor = "gray";
	public static String emoteColor = "gold";
	public static String quitMessage = "Leaving.";
	public static String displayMode = "S-Light";
	public static String originalDisplayMode;
	public static boolean relayDeathMessages = true;
	public static boolean relayMinecraftJoinLeave = true;
	public static boolean relayIRCJoinLeave = true;
	public static boolean relayNickChanges = true;
	public static boolean hudRecState = true;
	public static String botProfile = "Custom";
	public static boolean vanillaChat = true;
	
	public static void load(Configuration config) {
		displayMode = Utils.unquote(config.get(CATEGORY, "displayMode", displayMode).getString());
		ircColor = config.get(CATEGORY, "ircColor", ircColor).getString();
		emoteColor = config.get(CATEGORY, "emoteColor", emoteColor).getString();
		relayDeathMessages = config.get(CATEGORY, "relayDeathMessages", relayDeathMessages).getBoolean(relayDeathMessages);
		relayMinecraftJoinLeave = config.get(CATEGORY, "relayMinecraftJoinLeave", relayMinecraftJoinLeave).getBoolean(relayMinecraftJoinLeave);
		relayIRCJoinLeave = config.get(CATEGORY, "relayIRCJoinLeave", relayIRCJoinLeave).getBoolean(relayIRCJoinLeave);
		relayNickChanges = config.get(CATEGORY, "relayNickChanges", relayNickChanges).getBoolean(relayNickChanges);
		opColor = config.get(CATEGORY, "opColor", opColor).getString();
		enableNameColors = config.get(CATEGORY, "enableNameColors", enableNameColors).getBoolean(enableNameColors);
		hudRecState = config.get(CATEGORY, "hudRecState", hudRecState).getBoolean(hudRecState);
		vanillaChat = config.get(CATEGORY, "vanillaChat", vanillaChat).getBoolean(vanillaChat);
		
		ConfigCategory displayFormatCategory = config.getCategory(CATEGORY + Configuration.CATEGORY_SPLITTER + ConfigurationHandler.CATEGORY_FORMATS);
		DisplayFormatConfig.defaultConfig(config, displayFormatCategory);
		for(ConfigCategory category : displayFormatCategory.getChildren()) {
{'fraction_non_alphanumeric': 0.09664623151821132, 'fraction_numerical': 0.00432744320230797, 'mean_word_length': 7.229970326409496, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3108522', 'n_tokens_mistral': 1719, 'n_tokens_neox': 1642, 'n_words': 354}