From 090f4830bb067206adb51ce73cf1195642cfe168 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 30 Nov 2023 11:42:52 +0000 Subject: mod_cron: Rename variable to fix shadowing (#luacheck) --- plugins/mod_cron.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_cron.lua b/plugins/mod_cron.lua index cff7b4df..2c757574 100644 --- a/plugins/mod_cron.lua +++ b/plugins/mod_cron.lua @@ -82,7 +82,7 @@ module:add_item("shell-command", { name = "tasks"; desc = "View registered tasks"; args = {}; - handler = function (self, host) + handler = function (self, filter_host) local format_table = require "prosody.util.human.io".table; local it = require "util.iterators"; local row = format_table({ @@ -94,7 +94,7 @@ module:add_item("shell-command", { }, self.session.width); local print = self.session.print; print(row()); - for host in it.sorted_pairs(host and { [host]=true } or active_hosts) do + for host in it.sorted_pairs(filter_host and { [filter_host]=true } or active_hosts) do for _, task in ipairs(module:context(host):get_host_items("task")) do print(row { host, task.id, task.name, task.when, task.last and os.date("%Y-%m-%d %R:%S", task.last) or "never" }); --self.session.print(require "util.serialization".serialize(task, "debug")); -- cgit v1.2.3