aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-21 16:43:55 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-21 16:43:55 +0000
commit3f5d58f583d2fd78ab6bcbcdf9bce239efee9652 (patch)
treee0424fa83e56b3b610d020443000306732d07635 /plugins
parent551d3cf7b732bc5c6a0ce86c8875bedf0badc39b (diff)
parent73fbe10cd67b212ebcd021913de1a754c8d8f64f (diff)
downloadprosody-3f5d58f583d2fd78ab6bcbcdf9bce239efee9652.tar.gz
prosody-3f5d58f583d2fd78ab6bcbcdf9bce239efee9652.zip
Merge 0.7 with 0.7 with trunk \o/
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_iq.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/mod_iq.lua b/plugins/mod_iq.lua
index 5be04533..0e1dadfc 100644
--- a/plugins/mod_iq.lua
+++ b/plugins/mod_iq.lua
@@ -53,6 +53,18 @@ module:hook("iq/bare", function(data)
end
end);
+module:hook("iq/self", function(data)
+ -- IQ to bare JID recieved
+ local origin, stanza = data.origin, data.stanza;
+
+ if stanza.attr.type == "get" or stanza.attr.type == "set" then
+ return module:fire_event("iq/self/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
+ else
+ module:fire_event("iq/self/"..stanza.attr.id, data);
+ return true;
+ end
+end);
+
module:hook("iq/host", function(data)
-- IQ to a local host recieved
local origin, stanza = data.origin, data.stanza;