/// <summary> /// Removes all gamespy related redirects in the specified hosts file container /// </summary> /// <param name="HostFile"></param> private static void RemoveRedirects(HostsFile HostFile) { // Remove Gamespy Addresses. Use a Bitwise OR here to execute both methods if (HostFile.Remove(Bf2StatsHost) | HostFile.RemoveAll(GamespyHosts)) { // Save Changes HostFile.Save(); // Flush the Cache of the gamespy hosts foreach (string host in GamespyHosts) { DnsFlushResolverCacheEntry(host); } // Flush stats server DnsFlushResolverCacheEntry(Bf2StatsHost); } }
/// <summary> /// Removes all gamespy related redirects in the specified hosts file container /// </summary> /// <param name="HostFile"></param> private static void RemoveRedirects(HostsFile HostFile) { // Remove Gamespy Addresses. Use a Bitwise OR here to execute both methods if (HostFile.Remove(Bf2StatsHost) | HostFile.RemoveAll(GamespyHosts)) { // Save Changes HostFile.Save(); // Flush the Cache of the gamespy hosts foreach (string host in GamespyHosts) DnsFlushResolverCacheEntry(host); // Flush stats server DnsFlushResolverCacheEntry(Bf2StatsHost); } }