# HG changeset patch # User Kim Alvefur # Date 1673109376 -3600 # Node ID 0772facc786f757dba1099fdba4782d695bfc101 # Parent cde38b7de04a33867ee5caf133ea6dd4f3336133 mod_ping_muc: Error out if loaded on Components Several users report tracebacks that could only happen when loaded outside of a VirtualHost diff -r cde38b7de04a -r 0772facc786f mod_ping_muc/README.md --- a/mod_ping_muc/README.md Sat Jan 07 17:15:47 2023 +0100 +++ b/mod_ping_muc/README.md Sat Jan 07 17:36:16 2023 +0100 @@ -23,6 +23,10 @@ # Configuring +No configuration. Enable as a regular module in +[`modules_enabled`][doc:modules_enabled] globally or under a +`VirtualHost`: + ```lua modules_enabled = { -- other modules etc diff -r cde38b7de04a -r 0772facc786f mod_ping_muc/mod_ping_muc.lua --- a/mod_ping_muc/mod_ping_muc.lua Sat Jan 07 17:15:47 2023 +0100 +++ b/mod_ping_muc/mod_ping_muc.lua Sat Jan 07 17:36:16 2023 +0100 @@ -3,6 +3,11 @@ local set = require "util.set"; local st = require "util.stanza"; +if module:get_host_type() ~= "local" then + module:log("error", "mod_%s must be loaded as a regular module, not on Components", module.name); + return +end + module:depends "track_muc_joins"; module:add_feature("https://modules.prosody.im/mod_" .. module.name);