Diff

plugins/mod_s2s/mod_s2s.lua @ 6259:36f611624987

mod_s2s: Fire a 's2s-created' event when new s2s connections are initialized
author Kim Alvefur <zash@zash.se>
date Sat, 24 May 2014 11:17:26 +0200
parent 6257:9dace3a712f0
child 6301:2fdd71b08126
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua	Thu May 22 22:49:43 2014 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Sat May 24 11:17:26 2014 +0200
@@ -576,6 +576,8 @@
 		return handlestanza(session, stanza);
 	end
 
+	module:fire_event("s2s-created", { session = session });
+
 	add_task(connect_timeout, function ()
 		if session.type == "s2sin" or session.type == "s2sout" then
 			return; -- Ok, we're connected