Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 7694:bffbea1187ca
MUC: Run component shutdown after mod_c2s has closed its sessions (prevents ghosts)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 15 Oct 2016 17:40:31 +0200 |
parent | 7650:4c2407422f71 |
child | 7747:0e442402cebc |
comparison
equal
deleted
inserted
replaced
7693:93c041d5bb0b | 7694:bffbea1187ca |
---|---|
304 function shutdown_component() | 304 function shutdown_component() |
305 for room in each_room(true) do | 305 for room in each_room(true) do |
306 room:save(nil, true); | 306 room:save(nil, true); |
307 end | 307 end |
308 end | 308 end |
309 module:hook_global("server-stopping", shutdown_component); | 309 module:hook_global("server-stopping", shutdown_component, -300); |
310 | 310 |
311 do -- Ad-hoc commands | 311 do -- Ad-hoc commands |
312 module:depends "adhoc"; | 312 module:depends "adhoc"; |
313 local t_concat = table.concat; | 313 local t_concat = table.concat; |
314 local adhoc_new = module:require "adhoc".new; | 314 local adhoc_new = module:require "adhoc".new; |