# HG changeset patch # User Kim Alvefur # Date 1631577830 -7200 # Node ID 60018637f5d49271e3be37e8d25cb648731660c0 # Parent 8c9ec2db1d95acdb51f4e59469cfccd45a8a4742 util.prosodyctl.check: Nudge towards plural port options The singulars are supposed to be deprecated diff -r 8c9ec2db1d95 -r 60018637f5d4 util/prosodyctl/check.lua --- a/util/prosodyctl/check.lua Tue Sep 14 01:41:59 2021 +0200 +++ b/util/prosodyctl/check.lua Tue Sep 14 02:03:50 2021 +0200 @@ -103,11 +103,13 @@ require_encryption = "use 'c2s_require_encryption' and 's2s_require_encryption'", vcard_compatibility = "use 'mod_compat_vcard' from prosody-modules", }; + -- FIXME all the singular _port and _interface options are supposed to be deprecated too local deprecated_ports = { bosh = "http", legacy_ssl = "c2s_direct_tls" }; local port_suffixes = set.new({ "port", "ports", "interface", "interfaces", "ssl" }); for port, replacement in pairs(deprecated_ports) do for suffix in port_suffixes do - deprecated_replacements[port.."_"..suffix] = "use '"..replacement.."_"..suffix.."'" + local rsuffix = (suffix == "port" or suffix == "interface") and suffix.."s" or suffix; + deprecated_replacements[port.."_"..suffix] = "use '"..replacement.."_"..rsuffix.."'" end end local deprecated = set.new(array.collect(it.keys(deprecated_replacements)));