namespace Supercell.Laser.Server.Settings { using Newtonsoft.Json; public class Configuration { public static Configuration Instance; [JsonProperty("udp_host")] public readonly string UdpHost; [JsonProperty("udp_port")] public readonly int UdpPort; [JsonProperty("database_username")] public readonly string DatabaseUsername; [JsonProperty("database_password")] public readonly string DatabasePassword; [JsonProperty("database_name")] public readonly string DatabaseName; [JsonProperty("scid_domain")] public readonly string ScidDomain = "weizyvpn.duckdns.org"; [JsonProperty("smtp_email")] public readonly string SmtpEmail = "idMetaBrawl@hotmail.com"; [JsonProperty("smtp_password")] public readonly string SmtpPassword = "ulirbeqcgpjvrlkh"; [JsonProperty("creator_codes")] public readonly System.Collections.Generic.List CreatorCodes = new System.Collections.Generic.List() { "weizy" }; public static Configuration LoadFromFile(string filename) { var config = JsonConvert.DeserializeObject(File.ReadAllText(filename)); if (config?.CreatorCodes != null) { Supercell.Laser.Logic.Command.Home.LogicSetSupportedCreatorCodeCommand.ValidCodes = new System.Collections.Generic.HashSet(config.CreatorCodes, StringComparer.OrdinalIgnoreCase); } return config; } } }