using System.IO; namespace SharpChat.Flashii { public static class FlashiiUrls { private const string BASE_URL_FILE = @"msz_url.txt"; private const string BASE_URL = @"https://flashii.net"; private const string AUTH = BASE_URL + @"/_sockchat/verify"; private const string BANS = BASE_URL + @"/_sockchat/bans"; private const string BUMP = BASE_URL + @"/_sockchat/bump"; public static string AuthURL { get; } public static string BansURL { get; } public static string BumpURL { get; } static FlashiiUrls() { AuthURL = GetURL(AUTH); BansURL = GetURL(BANS); BumpURL = GetURL(BUMP); } public static string GetBaseURL() { if(!File.Exists(BASE_URL_FILE)) return BASE_URL; string url = File.ReadAllText(BASE_URL_FILE).Trim().Trim('/'); if(string.IsNullOrEmpty(url)) return BASE_URL; return url; } public static string GetURL(string path) { return GetBaseURL() + path; } } }