plugins/mod_component.lua

changeset 3604
3e89f0509967
parent 3587
d94aacb2771a
child 3615
c72d24c2d97b
equal deleted inserted replaced
3603:fdc671381411 3604:3e89f0509967
13 local hosts = _G.hosts; 13 local hosts = _G.hosts;
14 14
15 local t_concat = table.concat; 15 local t_concat = table.concat;
16 16
17 local config = require "core.configmanager"; 17 local config = require "core.configmanager";
18 local cm_register_component = require "core.componentmanager".register_component;
19 local cm_deregister_component = require "core.componentmanager".deregister_component;
20 local sha1 = require "util.hashes".sha1; 18 local sha1 = require "util.hashes".sha1;
21 local st = require "util.stanza"; 19 local st = require "util.stanza";
22 20
23 local log = module._log; 21 local log = module._log;
24 22
52 module:hook("message/full", handle_stanza); 50 module:hook("message/full", handle_stanza);
53 module:hook("presence/full", handle_stanza); 51 module:hook("presence/full", handle_stanza);
54 module:hook("iq/host", handle_stanza); 52 module:hook("iq/host", handle_stanza);
55 module:hook("message/host", handle_stanza); 53 module:hook("message/host", handle_stanza);
56 module:hook("presence/host", handle_stanza); 54 module:hook("presence/host", handle_stanza);
57
58 cm_register_component(module.host, function() end);
59 55
60 --- Handle authentication attempts by components 56 --- Handle authentication attempts by components
61 function handle_component_auth(event) 57 function handle_component_auth(event)
62 local session, stanza = event.origin, event.stanza; 58 local session, stanza = event.origin, event.stanza;
63 59

mercurial