aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-03-05 14:08:26 +0100
committerKim Alvefur <zash@zash.se>2023-03-05 14:08:26 +0100
commit283322543ed407640c9ac806120040a057f0b6dd (patch)
tree8ba8640ed3e9b09047a812c22f71e20ef305723e
parent32445b308284f8475587aa12dd4778c3234aa31a (diff)
downloadprosody-283322543ed407640c9ac806120040a057f0b6dd.tar.gz
prosody-283322543ed407640c9ac806120040a057f0b6dd.zip
mod_admin_shell: Show reverse dependencies in module:info()
Why was this module loaded? Now you can find out!
-rw-r--r--plugins/mod_admin_shell.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index 4a3a0641..1b11bf52 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -575,6 +575,12 @@ function def_env.module:info(name, hosts)
print(" - mod_" .. dep);
end
end
+ if mod.module.reverse_dependencies and next(mod.module.reverse_dependencies) ~= nil then
+ print(" reverse dependencies:");
+ for dep in pairs(mod.module.reverse_dependencies) do
+ print(" - mod_" .. dep);
+ end
+ end
end
return true;
end