aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl/check.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-09-14 02:03:50 +0200
committerKim Alvefur <zash@zash.se>2021-09-14 02:03:50 +0200
commit2f7189e8ff3dcbb27310f56194445cf0ada52af3 (patch)
tree64e0debd2cad6cd884d8fdf437718b942123831c /util/prosodyctl/check.lua
parentbf228a8a7a5cbd12596e94f5f226938b30e69712 (diff)
downloadprosody-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/check.lua')
-rw-r--r--util/prosodyctl/check.lua4
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)));