private void changeHostAndStartApp(LaServer srv) { List <HostChanger.hostEntry> entries = new List <HostChanger.hostEntry>(); if (srv.L2auth) { entries.Add(new HostChanger.hostEntry { ip = srv.ServerIp, hostname = "l2authd.lineage2.com", comment = srv.ServerName }); } if (srv.L2testauth) { entries.Add(new HostChanger.hostEntry { ip = srv.ServerIp, hostname = "l2testauthd.lineage2.com", comment = srv.ServerName }); } if (srv.GgServer) { // 216.107.250.194 nprotect.lineage2.com entries.Add(new HostChanger.hostEntry { ip = this.serverList.GgServer, hostname = "nprotect.lineage2.com", comment = "Gameguard Server" }); } HostChanger.GetInstance().AddEntries(entries.ToArray()); this.checkHostEntry(entries[0]); }
public static HostChanger GetInstance() { if (HostChanger.instance == null) { HostChanger.instance = new HostChanger(); } return(HostChanger.instance); }
private void checkHostEntry(HostChanger.hostEntry entry) { Dns.BeginGetHostAddresses(entry.hostname, new AsyncCallback(ProcessHostEntries), entry); }
private void clearHostsToolStripMenuItem_Click(object sender, EventArgs e) { HostChanger.GetInstance().RemoveEntry("l2authd.lineage2.com"); HostChanger.GetInstance().RemoveEntry("l2testauthd.lineage2.com"); }
public static HostChanger GetInstance() { if (HostChanger.instance == null) HostChanger.instance = new HostChanger(); return HostChanger.instance; }