mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
prosody: Removed all references to componentmanager from Prosody, except the main componentmanager file.
This commit is contained in:
parent
072e5be5d2
commit
d38fc9dce0
5 changed files with 1 additions and 17 deletions
|
@ -15,8 +15,6 @@ local lxp = require "lxp";
|
||||||
local logger = require "util.logger";
|
local logger = require "util.logger";
|
||||||
local config = require "core.configmanager";
|
local config = require "core.configmanager";
|
||||||
local connlisteners = require "net.connlisteners";
|
local connlisteners = require "net.connlisteners";
|
||||||
local cm_register_component = require "core.componentmanager".register_component;
|
|
||||||
local cm_deregister_component = require "core.componentmanager".deregister_component;
|
|
||||||
local uuid_gen = require "util.uuid".generate;
|
local uuid_gen = require "util.uuid".generate;
|
||||||
local jid_split = require "util.jid".split;
|
local jid_split = require "util.jid".split;
|
||||||
local sha1 = require "util.hashes".sha1;
|
local sha1 = require "util.hashes".sha1;
|
||||||
|
|
|
@ -15,8 +15,6 @@ local hosts = _G.hosts;
|
||||||
local t_concat = table.concat;
|
local t_concat = table.concat;
|
||||||
|
|
||||||
local config = require "core.configmanager";
|
local config = require "core.configmanager";
|
||||||
local cm_register_component = require "core.componentmanager".register_component;
|
|
||||||
local cm_deregister_component = require "core.componentmanager".deregister_component;
|
|
||||||
local sha1 = require "util.hashes".sha1;
|
local sha1 = require "util.hashes".sha1;
|
||||||
local st = require "util.stanza";
|
local st = require "util.stanza";
|
||||||
|
|
||||||
|
@ -55,8 +53,6 @@ module:hook("iq/host", handle_stanza);
|
||||||
module:hook("message/host", handle_stanza);
|
module:hook("message/host", handle_stanza);
|
||||||
module:hook("presence/host", handle_stanza);
|
module:hook("presence/host", handle_stanza);
|
||||||
|
|
||||||
cm_register_component(module.host, function() end);
|
|
||||||
|
|
||||||
--- Handle authentication attempts by components
|
--- Handle authentication attempts by components
|
||||||
function handle_component_auth(event)
|
function handle_component_auth(event)
|
||||||
local session, stanza = event.origin, event.stanza;
|
local session, stanza = event.origin, event.stanza;
|
||||||
|
|
|
@ -16,7 +16,6 @@ end
|
||||||
|
|
||||||
local jid_split, jid_join, jid_compare = require "util.jid".split, require "util.jid".join, require "util.jid".compare;
|
local jid_split, jid_join, jid_compare = require "util.jid".split, require "util.jid".join, require "util.jid".compare;
|
||||||
local st = require "util.stanza";
|
local st = require "util.stanza";
|
||||||
local componentmanager = require "core.componentmanager";
|
|
||||||
local config_get = require "core.configmanager".get;
|
local config_get = require "core.configmanager".get;
|
||||||
local connlisteners = require "net.connlisteners";
|
local connlisteners = require "net.connlisteners";
|
||||||
local sha1 = require "util.hashes".sha1;
|
local sha1 = require "util.hashes".sha1;
|
||||||
|
@ -185,7 +184,6 @@ local function get_stream_host(origin, stanza)
|
||||||
end
|
end
|
||||||
|
|
||||||
module.unload = function()
|
module.unload = function()
|
||||||
componentmanager.deregister_component(host);
|
|
||||||
connlisteners.deregister(module.host .. ':proxy65');
|
connlisteners.deregister(module.host .. ':proxy65');
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -260,4 +258,3 @@ if not connlisteners.register(module.host .. ':proxy65', connlistener) then
|
||||||
end
|
end
|
||||||
|
|
||||||
connlisteners.start(module.host .. ':proxy65');
|
connlisteners.start(module.host .. ':proxy65');
|
||||||
component = componentmanager.register_component(host, function() end);
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ if restrict_room_creation then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local muc_new_room = module:require "muc".new_room;
|
local muc_new_room = module:require "muc".new_room;
|
||||||
local register_component = require "core.componentmanager".register_component;
|
|
||||||
local deregister_component = require "core.componentmanager".deregister_component;
|
|
||||||
local jid_split = require "util.jid".split;
|
local jid_split = require "util.jid".split;
|
||||||
local jid_bare = require "util.jid".bare;
|
local jid_bare = require "util.jid".bare;
|
||||||
local st = require "util.stanza";
|
local st = require "util.stanza";
|
||||||
|
@ -163,8 +161,7 @@ module:hook("iq/host", stanza_handler);
|
||||||
module:hook("message/host", stanza_handler);
|
module:hook("message/host", stanza_handler);
|
||||||
module:hook("presence/host", stanza_handler);
|
module:hook("presence/host", stanza_handler);
|
||||||
|
|
||||||
component = register_component(muc_host, function() end);
|
hosts[module.host].send = function(stanza) -- FIXME do a generic fix
|
||||||
function component.send(stanza) -- FIXME do a generic fix
|
|
||||||
if stanza.attr.type == "result" or stanza.attr.type == "error" then
|
if stanza.attr.type == "result" or stanza.attr.type == "error" then
|
||||||
core_post_stanza(component, stanza);
|
core_post_stanza(component, stanza);
|
||||||
else error("component.send only supports result and error stanzas at the moment"); end
|
else error("component.send only supports result and error stanzas at the moment"); end
|
||||||
|
@ -172,9 +169,6 @@ end
|
||||||
|
|
||||||
prosody.hosts[module:get_host()].muc = { rooms = rooms };
|
prosody.hosts[module:get_host()].muc = { rooms = rooms };
|
||||||
|
|
||||||
module.unload = function()
|
|
||||||
deregister_component(muc_host);
|
|
||||||
end
|
|
||||||
module.save = function()
|
module.save = function()
|
||||||
return {rooms = rooms};
|
return {rooms = rooms};
|
||||||
end
|
end
|
||||||
|
|
1
prosody
1
prosody
|
@ -309,7 +309,6 @@ function load_secondary_libraries()
|
||||||
require "core.modulemanager"
|
require "core.modulemanager"
|
||||||
require "core.usermanager"
|
require "core.usermanager"
|
||||||
require "core.sessionmanager"
|
require "core.sessionmanager"
|
||||||
require "core.componentmanager"
|
|
||||||
require "core.stanza_router"
|
require "core.stanza_router"
|
||||||
|
|
||||||
require "net.http"
|
require "net.http"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue