Comparison

plugins/mod_muc_mam.lua @ 9872:e1d68f32ce29

mod_muc_mam: Set error status if loaded on incorrect host type
author Matthew Wild <mwild1@gmail.com>
date Tue, 19 Mar 2019 09:08:56 +0000
parent 9845:774b2ce62318
child 9882:18f025b3987d
comparison
equal deleted inserted replaced
9871:744e08ac5596 9872:e1d68f32ce29
2 -- Copyright (C) 2011-2017 Kim Alvefur 2 -- Copyright (C) 2011-2017 Kim Alvefur
3 -- 3 --
4 -- This file is MIT/X11 licensed. 4 -- This file is MIT/X11 licensed.
5 5
6 if module:get_host_type() ~= "component" then 6 if module:get_host_type() ~= "component" then
7 module:log("error", "mod_%s should be loaded only on a MUC component, not normal hosts", module.name); 7 module:log_status("error", "mod_%s should be loaded only on a MUC component, not normal hosts", module.name);
8 return; 8 return;
9 end 9 end
10 10
11 local xmlns_mam = "urn:xmpp:mam:2"; 11 local xmlns_mam = "urn:xmpp:mam:2";
12 local xmlns_delay = "urn:xmpp:delay"; 12 local xmlns_delay = "urn:xmpp:delay";