Comparison

mod_http_upload/mod_http_upload.lua @ 3962:190e74e097ee

mod_http_upload: Show help message if not at least one host/user is given
author Kim Alvefur <zash@zash.se>
date Mon, 30 Mar 2020 19:56:09 +0200
parent 3961:6fd9c9708422
child 4076:f1f796e551f1
comparison
equal deleted inserted replaced
3961:6fd9c9708422 3962:190e74e097ee
413 module:log("info", "Storage path: '%s'", storage_path); 413 module:log("info", "Storage path: '%s'", storage_path);
414 414
415 function module.command(args) 415 function module.command(args)
416 datamanager = require "core.storagemanager".olddm; 416 datamanager = require "core.storagemanager".olddm;
417 -- luacheck: ignore 421/user 417 -- luacheck: ignore 421/user
418 if args[1] == "expire" then 418 if args[1] == "expire" and args[2] then
419 local split = require "util.jid".prepped_split; 419 local split = require "util.jid".prepped_split;
420 for i = 2, #args do 420 for i = 2, #args do
421 local user, host = split(args[i]); 421 local user, host = split(args[i]);
422 if user then 422 if user then
423 assert(expire(user, host)); 423 assert(expire(user, host));