plugins/mod_component.lua

changeset 3615
c72d24c2d97b
parent 3604
3e89f0509967
child 3616
95ae7af2c82b
equal deleted inserted replaced
3614:8b436cc88c0e 3615:c72d24c2d97b
39 log("warn", "Stanza being handled by default component; bouncing error for: %s", stanza:top_tag()); 39 log("warn", "Stanza being handled by default component; bouncing error for: %s", stanza:top_tag());
40 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then 40 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then
41 event.origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable")); 41 event.origin.send(st.error_reply(stanza, "wait", "service-unavailable", "Component unavailable"));
42 end 42 end
43 end 43 end
44 return true;
44 end 45 end
45 46
46 module:hook("iq/bare", handle_stanza); 47 module:hook("iq/bare", handle_stanza);
47 module:hook("message/bare", handle_stanza); 48 module:hook("message/bare", handle_stanza);
48 module:hook("presence/bare", handle_stanza); 49 module:hook("presence/bare", handle_stanza);

mercurial