Software /
code /
prosody
Changeset
11800:60018637f5d4
util.prosodyctl.check: Nudge towards plural port options
The singulars are supposed to be deprecated
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 14 Sep 2021 02:03:50 +0200 |
parents | 11799:8c9ec2db1d95 |
children | 11801:ab0dfe9cbe69 |
files | util/prosodyctl/check.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)));