File

util/mod_ping.lua @ 425:f3b65866192e

Added mod_ping with support for [XEP-0199: XMPP Ping]
author Waqas Hussain <waqas20@gmail.com>
date Wed, 26 Nov 2008 09:06:32 +0500
line wrap: on
line source


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);