Mercurial > prosody-hg
comparison plugins/mod_muc.lua @ 707:bb9583314ec7
mod_muc: deregister component on unload
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 13 Jan 2009 20:18:20 +0500 |
| parents | c7519f0c9a2c |
| children | 7653519ec4f2 |
comparison
equal
deleted
inserted
replaced
| 706:ce772e283992 | 707:bb9583314ec7 |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 3 local register_component = require "core.componentmanager".register_component; | 3 local register_component = require "core.componentmanager".register_component; |
| 4 local deregister_component = require "core.componentmanager".deregister_component; | |
| 4 local jid_split = require "util.jid".split; | 5 local jid_split = require "util.jid".split; |
| 5 local jid_bare = require "util.jid".bare; | 6 local jid_bare = require "util.jid".bare; |
| 6 local st = require "util.stanza"; | 7 local st = require "util.stanza"; |
| 7 local log = require "util.logger".init("mod_muc"); | 8 local log = require "util.logger".init("mod_muc"); |
| 8 local multitable_new = require "util.multitable".new; | 9 local multitable_new = require "util.multitable".new; |
| 270 else -- to the main muc domain | 271 else -- to the main muc domain |
| 271 if type == "error" or type == "result" then return; end | 272 if type == "error" or type == "result" then return; end |
| 272 handle_to_domain(origin, stanza); | 273 handle_to_domain(origin, stanza); |
| 273 end | 274 end |
| 274 end); | 275 end); |
| 276 | |
| 277 function unload() | |
| 278 deregister_component(muc_domain); | |
| 279 end | |
| 280 |
