changeset 10194 | f506964a1123 |
parent 10192 | dbd9880bf5c6 |
child 10206 | d3764eed7ded |
10193:d311168c71d1 | 10194:f506964a1123 |
---|---|
108 show_usage([[list]], [[Shows installed rocks]]); |
108 show_usage([[list]], [[Shows installed rocks]]); |
109 return 1; |
109 return 1; |
110 end |
110 end |
111 table.insert(arg, "list"); |
111 table.insert(arg, "list"); |
112 execute_command(arg); |
112 execute_command(arg); |
113 end |
|
114 |
|
115 function commands.enabled_plugins(arg) |
|
116 if arg[1] == "--help" then |
|
117 show_usage([[enabled_plugins]], [[Shows plugins currently enabled on prosody]]); |
|
118 return 1; |
|
119 end |
|
120 for module in modulemanager.get_modules_for_host() do |
|
121 show_warning("%s", module) |
|
122 end |
|
123 end |
113 end |
124 |
114 |
125 function commands.adduser(arg) |
115 function commands.adduser(arg) |
126 if not arg[1] or arg[1] == "--help" then |
116 if not arg[1] or arg[1] == "--help" then |
127 show_usage([[adduser JID]], [[Create the specified user account in Prosody]]); |
117 show_usage([[adduser JID]], [[Create the specified user account in Prosody]]); |
1385 print("Usage: "..arg[0].." COMMAND [OPTIONS]"); |
1375 print("Usage: "..arg[0].." COMMAND [OPTIONS]"); |
1386 print(""); |
1376 print(""); |
1387 print("Where COMMAND may be one of:\n"); |
1377 print("Where COMMAND may be one of:\n"); |
1388 |
1378 |
1389 local hidden_commands = require "util.set".new{ "register", "unregister", "addplugin" }; |
1379 local hidden_commands = require "util.set".new{ "register", "unregister", "addplugin" }; |
1390 local commands_order = { "install", "remove", "list", "enabled_plugins", "adduser", "passwd", "deluser", "start", "stop", "restart", "reload", |
1380 local commands_order = { "install", "remove", "list", "adduser", "passwd", "deluser", "start", "stop", "restart", "reload", |
1391 "about" }; |
1381 "about" }; |
1392 |
1382 |
1393 local done = {}; |
1383 local done = {}; |
1394 |
1384 |
1395 for _, command_name in ipairs(commands_order) do |
1385 for _, command_name in ipairs(commands_order) do |