# HG changeset patch # User Kim Alvefur # Date 1433770048 -7200 # Node ID e4c3d335b07f42ea42323218d93b792b00014b31 # Parent 1a7867eaac9e21beefba71e30213c8849bf2db1f mod_list_inactive: Print some usage info when not called with enough arguments diff -r 1a7867eaac9e -r e4c3d335b07f mod_list_inactive/mod_list_inactive.lua --- a/mod_list_inactive/mod_list_inactive.lua Fri May 29 14:35:01 2015 +0200 +++ b/mod_list_inactive/mod_list_inactive.lua Mon Jun 08 15:27:28 2015 +0200 @@ -19,6 +19,15 @@ } function module.command(arg) + if #arg < 2 then + print("usage: prosodyctl mod_list_inactive example.net time [format]"); + print("time is a number followed by 'day', 'week', 'month' or 'year'"); + print("formats are:"); + for name, fmt in pairs(output_formats) do + print(name, fmt:format("user@example.com", "last action")) + end + return; + end local items = {}; local host = arg[1]; assert(hosts[host], "Host "..tostring(host).." does not exist");