Software /
code /
prosody
Comparison
plugins/mod_muc.lua @ 711:7653519ec4f2
mod_muc: Added unload, save and restore callbacks to allow reloading code while preserving state
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 13 Jan 2009 22:38:20 +0500 |
parent | 707:bb9583314ec7 |
child | 752:a9642c1d5827 |
comparison
equal
deleted
inserted
replaced
710:56f6c115bc69 | 711:7653519ec4f2 |
---|---|
272 if type == "error" or type == "result" then return; end | 272 if type == "error" or type == "result" then return; end |
273 handle_to_domain(origin, stanza); | 273 handle_to_domain(origin, stanza); |
274 end | 274 end |
275 end); | 275 end); |
276 | 276 |
277 function unload() | 277 module.unload = function() |
278 deregister_component(muc_domain); | 278 deregister_component(muc_domain); |
279 end | 279 end |
280 | 280 module.save = function() |
281 return {rooms = rooms.data; jid_nick = jid_nick.data; rooms_info = rooms_info.data; persist_list = persist_list}; | |
282 end | |
283 module.restore = function(data) | |
284 rooms.data, jid_nick.data, rooms_info.data, persist_list = | |
285 data.rooms or {}, data.jid_nick or {}, data.rooms_info or {}, data.persist_list or {}; | |
286 end |