view plugins/mod_ping.lua @ 14024:f65302ea37b0 13.0 13.0.3

mod_limits: Allow configuration of general 's2s' limit, and have s2sout inherit from s2sin Most people don't currently have a limit set for s2sout, as usually such sessions don't have significant incoming traffic. However, having limits in place is still sensible, especially with the rising use of bidi. The goal here is to switch people to a general 's2s' limit, which s2sin and s2sout both inherit from. Due to the widespread existence of 's2sin' in existing configurations, s2sout will inherit from that unless explicitly set.
author Matthew Wild <mwild1@gmail.com>
date Mon, 05 Jan 2026 11:35:32 +0000
parents 74b9e05af71e
children
line wrap: on
line source

-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--

local st = require "prosody.util.stanza";

module:add_feature("urn:xmpp:ping");

local function ping_handler(event)
	event.origin.send(st.reply(event.stanza));
	return true;
end

module:hook("iq-get/bare/urn:xmpp:ping:ping", ping_handler);
module:hook("iq-get/host/urn:xmpp:ping:ping", ping_handler);