Changeset

1266:605a73234230

mod_iq: Include event data in sub-events
author Waqas Hussain <waqas20@gmail.com>
date Mon, 01 Jun 2009 10:27:47 +0500
parents 1265:3f3c62e45eeb
children 1267:1bf897de6c24
files plugins/mod_iq.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_iq.lua	Mon Jun 01 09:49:37 2009 +0500
+++ b/plugins/mod_iq.lua	Mon Jun 01 10:27:47 2009 +0500
@@ -27,7 +27,7 @@
 	-- TODO if not user exists, return an error
 	-- TODO fire post processing events
 	if #stanza.tags == 1 then
-		return module:fire_event("iq/bare/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name);
+		return module:fire_event("iq/bare/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
 	else
 		return true; -- TODO do something with results and errors
 	end
@@ -38,7 +38,7 @@
 	local origin, stanza = data.origin, data.stanza;
 
 	if #stanza.tags == 1 then
-		return module:fire_event("iq/host/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name);
+		return module:fire_event("iq/host/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
 	else
 		return true; -- TODO do something with results and errors
 	end