Mercurial > prosody-modules
diff mod_ping_muc/mod_ping_muc.lua @ 5130:0772facc786f
mod_ping_muc: Error out if loaded on Components
Several users report tracebacks that could only happen when loaded
outside of a VirtualHost
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 07 Jan 2023 17:36:16 +0100 |
parents | 806f7c8d830b |
children | d6a695abb33c |
line wrap: on
line diff
--- 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);