mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Start documenting arguments in mod_admin_extra commands
This commit is contained in:
parent
d36c351fc7
commit
30d171e79e
@ -101,29 +101,45 @@ get_commands_spec() ->
|
||||
desc = "Recompile and reload Erlang source code file",
|
||||
module = ?MODULE, function = compile,
|
||||
args = [{file, string}],
|
||||
result = {res, rescode}},
|
||||
args_example = ["/home/me/srcs/ejabberd/mod_example.erl"],
|
||||
args_desc = ["Filename of erlang source file to compile"],
|
||||
result = {res, rescode},
|
||||
result_example = 0,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
#ejabberd_commands{name = get_cookie, tags = [erlang],
|
||||
desc = "Get the Erlang cookie of this node",
|
||||
module = ?MODULE, function = get_cookie,
|
||||
args = [],
|
||||
result = {cookie, string}},
|
||||
result = {cookie, string},
|
||||
result_example = "MWTAVMODFELNLSMYXPPD",
|
||||
result_desc = "Erlang cookie used for authentication by ejabberd"},
|
||||
#ejabberd_commands{name = remove_node, tags = [erlang],
|
||||
desc = "Remove an ejabberd node from Mnesia clustering config",
|
||||
module = ?MODULE, function = remove_node,
|
||||
args = [{node, string}],
|
||||
result = {res, rescode}},
|
||||
|
||||
args_example = ["ejabberd@server2"],
|
||||
args_desc = ["Name of erlang node to remove"],
|
||||
result = {res, rescode},
|
||||
result_example = 0,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
#ejabberd_commands{name = num_active_users, tags = [accounts, stats],
|
||||
desc = "Get number of users active in the last days",
|
||||
policy = admin,
|
||||
module = ?MODULE, function = num_active_users,
|
||||
args = [{host, binary}, {days, integer}],
|
||||
result = {users, integer}},
|
||||
args_example = [<<"myserver.com">>, 3],
|
||||
args_desc = ["Name of host to check", "Number of days to calculate sum"],
|
||||
result = {users, integer},
|
||||
result_example = 123,
|
||||
result_desc = "Number of users active on given server in last n days"},
|
||||
#ejabberd_commands{name = delete_old_users, tags = [accounts, purge],
|
||||
desc = "Delete users that didn't log in last days, or that never logged",
|
||||
module = ?MODULE, function = delete_old_users,
|
||||
args = [{days, integer}],
|
||||
result = {res, restuple}},
|
||||
args_example = [30],
|
||||
args_desc = ["Last login age in days of accounts that should be removed"],
|
||||
result_example = 0,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
#ejabberd_commands{name = delete_old_users_vhost, tags = [accounts, purge],
|
||||
desc = "Delete users that didn't log in last days in vhost, or that never logged",
|
||||
module = ?MODULE, function = delete_old_users_vhost,
|
||||
|
Loading…
Reference in New Issue
Block a user