From c63beda273f7180dcf4cff13db3921840818d2c6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 7 Nov 2019 19:23:42 +0100 Subject: mod_ping: Remove ad-hoc command 17:27:40 Zash: the Ping thing is absolutely worthless 17:27:55 The command provided by mod_ping? 17:27:59 To own server? 17:28:14 the Ping command in mod_admin_web, whatever it maps to 17:28:29 > Pong > 2019-11-07T16:28:16Z What am I supposed to do with that result? 17:28:29 Yeah, mod_ping provides that 17:28:41 Is it a ping to my own server? Where's the RTT? 17:28:48 Dunno if it's useful for more than verifying that the adhoc command system works 17:29:02 (it lags, but there is no indication of how much) 17:29:14 It can't really test that itself 17:29:52 Anyone opposed to deleting it? 17:30:42 Half the module 17:42:47 Zash, I'm fine with removing it --- plugins/mod_ping.lua | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'plugins/mod_ping.lua') diff --git a/plugins/mod_ping.lua b/plugins/mod_ping.lua index 5fff58d1..df24c495 100644 --- a/plugins/mod_ping.lua +++ b/plugins/mod_ping.lua @@ -16,18 +16,3 @@ end 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 - -local datetime = require "util.datetime".datetime; - -function ping_command_handler (self, data, state) -- luacheck: ignore 212 - local now = datetime(); - return { info = "Pong\n"..now, status = "completed" }; -end - -module:depends "adhoc"; -local adhoc_new = module:require "adhoc".new; -local descriptor = adhoc_new("Ping", "ping", ping_command_handler); -module:provides("adhoc", descriptor); - -- cgit v1.2.3