--- a/mod_muc_limits/mod_muc_limits.lua Fri Jan 18 17:02:12 2019 +0100
+++ b/mod_muc_limits/mod_muc_limits.lua Fri Jan 18 18:28:03 2019 +0100
@@ -72,13 +72,13 @@
end
end
-function module.unload()
- for room_jid, room in pairs(rooms) do
- room.throttle = nil;
+if rooms then
+ function module.unload()
+ for room_jid, room in pairs(rooms) do
+ room.throttle = nil;
+ end
end
-end
-if rooms then
module:hook("message/bare", handle_stanza, 501);
module:hook("message/full", handle_stanza, 501);
module:hook("presence/bare", handle_stanza, 501);