From d0481af8e07fbbc49b586680511cdd94525eb01e Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Wed, 26 Nov 2008 09:06:32 +0500 Subject: Added mod_ping with support for [XEP-0199: XMPP Ping] --- util/mod_ping.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 util/mod_ping.lua diff --git a/util/mod_ping.lua b/util/mod_ping.lua new file mode 100644 index 00000000..c13282ff --- /dev/null +++ b/util/mod_ping.lua @@ -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); -- cgit v1.2.3