mod_s2s: Fire a 's2s-created' event when new s2s connections are initialized
authorKim Alvefur <zash@zash.se>
Sat, 24 May 2014 11:17:26 +0200
changeset 6259 36f611624987
parent 6257 9dace3a712f0
child 6260 6986ca575568
mod_s2s: Fire a 's2s-created' event when new s2s connections are initialized
plugins/mod_s2s/mod_s2s.lua
--- 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