Changeset

339:72fbfb0367e9

plugins.ping: Reply to pings
author Kim Alvefur <zash@zash.se>
date Sat, 11 May 2013 18:42:13 +0200
parents 338:957704bbe9a1
children 340:0ce227f6034c
files plugins/ping.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/ping.lua	Fri May 10 12:19:57 2013 +0200
+++ b/plugins/ping.lua	Sat May 11 18:42:13 2013 +0200
@@ -17,5 +17,8 @@
 				callback(socket.gettime()-t, jid);
 			end);
 	end
+	stream:hook("iq/"..xmlns_ping, function(stanza)
+		return stream:send(verse.reply(stanza));
+	end);
 	return true;
 end