aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2023-11-30 11:42:52 +0000
committerMatthew Wild <mwild1@gmail.com>2023-11-30 11:42:52 +0000
commit090f4830bb067206adb51ce73cf1195642cfe168 (patch)
treeaeb0cab76525aeb43212b7646b4aa0bd7bbd808c /plugins
parent2524736225df2654f99f0de3aaa638428d7c9980 (diff)
downloadprosody-090f4830bb067206adb51ce73cf1195642cfe168.tar.gz
prosody-090f4830bb067206adb51ce73cf1195642cfe168.zip
mod_cron: Rename variable to fix shadowing (#luacheck)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_cron.lua4
1 files changed, 2 insertions, 2 deletions
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"));