# HG changeset patch # User Kim Alvefur # Date 1450087333 -3600 # Node ID 9329a11c03a62b9da07208d01ab5e61b1c79a246 # Parent b10118d7c0dfa9f239c818f66d28092b414a00e7 mod_mam_muc: Add guard to prevent loading on normal hosts diff -r b10118d7c0df -r 9329a11c03a6 mod_mam_muc/mod_mam_muc.lua --- 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";