# HG changeset patch # User João Duarte # Date 1561420332 -3600 # Node ID 406afedc9375fbb9448e78faa8aa4ee784dedc8a # Parent 026815f8d832eccf2198db6079cbecb14903e7cd prosodyctl: Changed the command 'admin_add' to 'admin_operation', which will be called by both add/remove operations diff -r 026815f8d832 -r 406afedc9375 prosodyctl --- a/prosodyctl Fri Jun 21 19:03:04 2019 +0100 +++ b/prosodyctl Tue Jun 25 00:52:12 2019 +0100 @@ -98,7 +98,7 @@ end end -function commands.admin_add(arg) +function admin_operation(operation, arg) local modules, tree, server, refresh = "", "", "", "" for i, _ in ipairs(arg) do if arg[i]:sub(1, #"--tree=") == "--tree=" then @@ -111,7 +111,7 @@ modules=modules..arg[i].." " end end - os.execute("luarocks-admin "..tree.."add "..server..refresh..modules) + os.execute("luarocks-admin "..tree..operation..server..refresh..modules) end function commands.enabled_plugins()