void LoadResumeInfo() { resumeUser = Options.Get("launcher-username"); resumeIp = Options.Get("launcher-ip") ?? ""; resumePort = Options.Get("launcher-port") ?? ""; resumeCCSkins = Options.GetBool("launcher-ccskins", true); IPAddress address; if (!IPAddress.TryParse(resumeIp, out address)) { resumeIp = ""; } ushort portNum; if (!UInt16.TryParse(resumePort, out portNum)) { resumePort = ""; } string mppass = Options.Get("launcher-mppass") ?? null; resumeMppass = Secure.Decode(mppass, resumeUser); resumeValid = !String.IsNullOrEmpty(resumeUser) && !String.IsNullOrEmpty(resumeIp) && !String.IsNullOrEmpty(resumePort) && !String.IsNullOrEmpty(resumeMppass); }
void LoadFromOptions() { if (!Options.Load()) { return; } string user = Options.Get("launcher-dc-username") ?? ""; string ip = Options.Get("launcher-dc-ip") ?? "127.0.0.1"; string port = Options.Get("launcher-dc-port") ?? "25565"; bool ccSkins = Options.GetBool("launcher-dc-ccskins", true); IPAddress address; if (!IPAddress.TryParse(ip, out address)) { ip = "127.0.0.1"; } ushort portNum; if (!UInt16.TryParse(port, out portNum)) { port = "25565"; } string mppass = Options.Get("launcher-dc-mppass"); mppass = Secure.Decode(mppass, user); Set(0, user); Set(1, ip + ":" + port); Set(2, mppass); SetBool(ccSkins); }
void LoadFromOptions() { if (!Options.Load()) { return; } string user = Options.Get("launcher-cc-username") ?? ""; string pass = Options.Get("launcher-cc-password") ?? ""; pass = Secure.Decode(pass, user); Set(0, user); Set(1, pass); }