Mercurial > prosody-modules
changeset 1973:9329a11c03a6
mod_mam_muc: Add guard to prevent loading on normal hosts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 14 Dec 2015 11:02:13 +0100 (2015-12-14) |
parents | b10118d7c0df |
children | 5be671db83a3 |
files | mod_mam_muc/mod_mam_muc.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_mam_muc/mod_mam_muc.lua Sat Dec 12 17:00:25 2015 +0100 +++ b/mod_mam_muc/mod_mam_muc.lua Mon Dec 14 11:02:13 2015 +0100 @@ -3,6 +3,11 @@ -- -- This file is MIT/X11 licensed. +if module:get_host_type() ~= "component" then + module:log("error", "mod_%s should be loaded only on a MUC component, not normal hosts", module.name); + return; +end + local xmlns_mam = "urn:xmpp:mam:0"; local xmlns_delay = "urn:xmpp:delay"; local xmlns_forward = "urn:xmpp:forward:0";