From 4b618a8727365b880e115c6fd53869040c2ad238 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Fri, 9 Aug 2013 17:48:21 +0200 Subject: Remove all trailing whitespace --- plugins/mod_ping.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_ping.lua') diff --git a/plugins/mod_ping.lua b/plugins/mod_ping.lua index 0bfcac66..eddb92d2 100644 --- a/plugins/mod_ping.lua +++ b/plugins/mod_ping.lua @@ -1,7 +1,7 @@ -- 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. -- -- cgit v1.2.3 From be627072d76e66b5ea48ac98080676115e2058f3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 9 Feb 2014 15:09:12 +0100 Subject: mod_ping: Use type-specific event --- plugins/mod_ping.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/mod_ping.lua') diff --git a/plugins/mod_ping.lua b/plugins/mod_ping.lua index eddb92d2..1a503409 100644 --- a/plugins/mod_ping.lua +++ b/plugins/mod_ping.lua @@ -11,14 +11,11 @@ local st = require "util.stanza"; module:add_feature("urn:xmpp:ping"); local function ping_handler(event) - if event.stanza.attr.type == "get" then - event.origin.send(st.reply(event.stanza)); - return true; - end + return event.origin.send(st.reply(event.stanza)); end -module:hook("iq/bare/urn:xmpp:ping:ping", ping_handler); -module:hook("iq/host/urn:xmpp:ping:ping", ping_handler); +module:hook("iq-get/bare/urn:xmpp:ping:ping", ping_handler); +module:hook("iq-get/host/urn:xmpp:ping:ping", ping_handler); -- Ad-hoc command -- cgit v1.2.3