public static bool CanAnnounceServer()
        {
            //return Netplay.ServerPassword == "";
            if (Main.netMode == 0)
            {
                //throw new Exception("Cannot add single player games to server browser.");
                return(false);
            }

            /*if( ServerBrowserMod.Instance.Config.IsServerHiddenFromBrowser ) {
             *      return false;
             * }
             * if( ServerBrowserMod.Instance.Config.IsServerHiddenFromBrowserUnlessPortForwardedViaUPNP && !Netplay.UseUPNP ) {
             *      return false;
             * }*/

            if (Main.netMode == 1)
            {
                if (NetHelpers.GetServerPing() == -1)
                {
                    return(false);
                }
            }

            string ip;

            try {
                ip = NetHelpers.GetPublicIP();
            } catch (Exception) {
                LogHelpers.Log("CanAddToBrowser - Invalid public IP");
                return(false);
            }

            if (ip == "127.0.0.1" || ip.Substring(0, 3) == "10.")
            {
                return(false);
            }
            switch (ip.Substring(0, 7))
            {
            case "192.168":
            case "172.16.":
            case "172.17.":
            case "172.18.":
            case "172.19.":
            case "172.20.":
            case "172.21.":
            case "172.22.":
            case "172.23.":
            case "172.24.":
            case "172.25.":
            case "172.26.":
            case "172.27.":
            case "172.28.":
            case "172.29.":
            case "172.30.":
            case "172.31.":
            case "172.32.":
                return(false);
            }

            return(true);
        }