aboutsummaryrefslogtreecommitdiffstats
path: root/core/modulemanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-05-16 01:41:45 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-05-16 01:41:45 +0500
commit32b1d54a24d043bff7f21baaf357b76f40015837 (patch)
tree3d927be268ea6de926d0394b03470840aecf11c4 /core/modulemanager.lua
parent77798443db633a40446a30be5e4ad5c568ef005d (diff)
downloadprosody-32b1d54a24d043bff7f21baaf357b76f40015837.tar.gz
prosody-32b1d54a24d043bff7f21baaf357b76f40015837.zip
stanza_router: Removed global function core_handle_stanza
Diffstat (limited to 'core/modulemanager.lua')
-rw-r--r--core/modulemanager.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 6dbc8c53..e0d5ce9b 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -226,7 +226,14 @@ function handle_stanza(host, origin, stanza)
(handlers[1])(origin, stanza);
return true;
else
- log("debug", "Stanza unhandled by any modules, xmlns: %s", stanza.attr.xmlns); -- we didn't handle it
+ log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it
+ if stanza.attr.xmlns == "jabber:client" then
+ if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then
+ origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
+ end
+ else
+ origin:close("unsupported-stanza-type");
+ end
end
end