diff mod_smacks/mod_smacks.lua @ 263:41f1cac40560

mod_smacks: Fixed to use the correct events API.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 16 Oct 2010 07:49:30 +0500
parents 36648205b10a
children 445178d15b51
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua	Sat Oct 16 06:23:16 2010 +0500
+++ b/mod_smacks/mod_smacks.lua	Sat Oct 16 07:49:30 2010 +0500
@@ -13,14 +13,14 @@
 local resume_timeout = 300;
 local max_unacked_stanzas = 0;
 
-module:add_event_hook("stream-features",
-		function (session, features)
-			features:tag("sm", sm_attr):tag("optional"):up():up();
+module:hook("stream-features",
+		function (event)
+			event.features:tag("sm", sm_attr):tag("optional"):up():up();
 		end);
 
 module:hook("s2s-stream-features",
-		function (data)
-			data.features:tag("sm", sm_attr):tag("optional"):up():up();
+		function (event)
+			event.features:tag("sm", sm_attr):tag("optional"):up():up();
 		end);
 
 module:hook_stanza(xmlns_sm, "enable",