# HG changeset patch # User Kim Alvefur # Date 1449155759 -3600 # Node ID aa8647a5105d2a9f371538f7b622af3f86f6e6e4 # Parent ebac87d80ef44e819425d1a52c532fc6ddab9003 prosodyctl check: Point out items in the modules_enabled list that incorrectly include the 'mod_' prefix diff -r ebac87d80ef4 -r aa8647a5105d prosodyctl --- a/prosodyctl Thu Dec 03 16:06:09 2015 +0100 +++ b/prosodyctl Thu Dec 03 16:15:59 2015 +0100 @@ -913,9 +913,18 @@ print(" For more information see: http://prosody.im/doc/dns"); end end + local all_modules = set.new(config["*"].modules_enabled); local all_options = set.new(it.to_array(it.keys(config["*"]))); for host in enabled_hosts() do all_options:include(set.new(it.to_array(it.keys(config[host])))); + all_modules:include(set.new(config[host].modules_enabled)); + end + for mod in all_modules do + if mod:match("^mod_") then + print(""); + print(" Modules in modules_enabled should not have the 'mod_' prefix included."); + print(" Change '"..mod.."' to '"..mod:match("^mod_(.*)").."'."); + end end local ssl = dependencies.softreq"ssl"; if not ssl then