aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/mod_muc.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index bc44815e..04846359 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -182,6 +182,11 @@ local rooms = cache.new(max_rooms or max_live_rooms, function (jid, room)
end
end);
+local measure_rooms_size = module:measure("live_room", "amount");
+module:hook_global("stats-update", function ()
+ measure_rooms_size(rooms:count());
+end);
+
-- Automatically destroy empty non-persistent rooms
module:hook("muc-occupant-left",function(event)
local room = event.room