# HG changeset patch # User Waqas Hussain # Date 1227672392 -18000 # Node ID f3b65866192ed6c37754d42ec5ac58745c9f69e8 # Parent 3eb22492e8ab61245b4dced147116f1c6ff8819f Added mod_ping with support for [XEP-0199: XMPP Ping] diff -r 3eb22492e8ab -r f3b65866192e util/mod_ping.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/mod_ping.lua Wed Nov 26 09:06:32 2008 +0500 @@ -0,0 +1,11 @@ + +local st = require "util.stanza"; + +require "core.discomanager".set("ping", "urn:xmpp:ping"); + +add_iq_handler({"c2s", "s2sin"}, "urn:xmpp:ping", + function(session, stanza) + if stanza.attr.type == "get" then + session.send(st.reply(stanza)); + end + end);