comparison mod_muc_limits/mod_muc_limits.lua @ 556:e50bdbaa7802

mod_muc_limits: Remove throttle object from all rooms on unload (to make sure new settings are applied on reload)
author Matthew Wild <mwild1@gmail.com>
date Sun, 15 Jan 2012 01:40:50 +0000
parents 2356ad05fdb6
children 14f39769c9e0
comparison
equal deleted inserted replaced
555:2356ad05fdb6 556:e50bdbaa7802
29 origin.send(st.error_reply(stanza, "wait", "policy-violation", "The room is currently overactive, please try again later")); 29 origin.send(st.error_reply(stanza, "wait", "policy-violation", "The room is currently overactive, please try again later"));
30 return true; 30 return true;
31 end 31 end
32 end 32 end
33 33
34 function module.unload()
35 for room_jid, room in pairs(hosts[module.host].modules.muc.rooms) do
36 room.throttle = nil;
37 end
38 end
39
34 module:hook("message/bare", handle_stanza, 10); 40 module:hook("message/bare", handle_stanza, 10);
35 module:hook("message/full", handle_stanza, 10); 41 module:hook("message/full", handle_stanza, 10);
36 module:hook("presence/bare", handle_stanza, 10); 42 module:hook("presence/bare", handle_stanza, 10);
37 module:hook("presence/full", handle_stanza, 10); 43 module:hook("presence/full", handle_stanza, 10);