mod_tls: Switch to : syntax for connection methods
[prosody.git] / plugins / mod_iq.lua
index 0faebaf93772656912f8e3339c5838c9d933fdda..5be045335c478e256913228207d31fc76b6f3719 100644 (file)
@@ -1,3 +1,11 @@
+-- Prosody IM
+-- Copyright (C) 2008-2009 Matthew Wild
+-- Copyright (C) 2008-2009 Waqas Hussain
+-- 
+-- This project is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
+--
+
 
 local st = require "util.stanza";
 local jid_split = require "util.jid".split;
@@ -40,7 +48,7 @@ module:hook("iq/bare", function(data)
        if stanza.attr.type == "get" or stanza.attr.type == "set" then
                return module:fire_event("iq/bare/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
        else
-               module:fire_event("iq/bare/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
+               module:fire_event("iq/bare/"..stanza.attr.id, data);
                return true;
        end
 end);
@@ -52,7 +60,7 @@ module:hook("iq/host", function(data)
        if stanza.attr.type == "get" or stanza.attr.type == "set" then
                return module:fire_event("iq/host/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
        else
-               module:fire_event("iq/host/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
+               module:fire_event("iq/host/"..stanza.attr.id, data);
                return true;
        end
 end);