diff options
author | Kim Alvefur <zash@zash.se> | 2021-09-14 02:03:50 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-09-14 02:03:50 +0200 |
commit | 2f7189e8ff3dcbb27310f56194445cf0ada52af3 (patch) | |
tree | 64e0debd2cad6cd884d8fdf437718b942123831c /util/prosodyctl | |
parent | bf228a8a7a5cbd12596e94f5f226938b30e69712 (diff) | |
download | prosody-2f7189e8ff3dcbb27310f56194445cf0ada52af3.tar.gz prosody-2f7189e8ff3dcbb27310f56194445cf0ada52af3.zip |
util.prosodyctl.check: Nudge towards plural port options
The singulars are supposed to be deprecated
Diffstat (limited to 'util/prosodyctl')
-rw-r--r-- | util/prosodyctl/check.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua index 92e0a0e8..7ece1069 100644 --- a/util/prosodyctl/check.lua +++ b/util/prosodyctl/check.lua @@ -103,11 +103,13 @@ local function check(arg) 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))); |