mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Commands: When result is rescode, result_desc is automatically added
This commit is contained in:
parent
f18b8d464d
commit
0961fa1830
@ -386,7 +386,7 @@ gen_doc(#ejabberd_commands{name=Name, tags=Tags, desc=Desc, longdesc=LongDesc,
|
||||
ResultText = case Result of
|
||||
{res,rescode} ->
|
||||
[?TAG(dl, [gen_param(res, integer,
|
||||
"Status code (0 on success, 1 otherwise)",
|
||||
"Status code (`0` on success, `1` otherwise)",
|
||||
HTMLOutput)])];
|
||||
{res,restuple} ->
|
||||
[?TAG(dl, [gen_param(res, string,
|
||||
|
@ -145,8 +145,7 @@ get_commands_spec() ->
|
||||
args_example = ["/home/me/srcs/ejabberd/mod_example.erl"],
|
||||
args_desc = ["Filename of erlang source file to compile"],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
result_example = ok},
|
||||
#ejabberd_commands{name = get_cookie, tags = [erlang],
|
||||
desc = "Get the Erlang cookie of this node",
|
||||
module = ?MODULE, function = get_cookie,
|
||||
@ -206,8 +205,7 @@ get_commands_spec() ->
|
||||
args_example = [<<"peter">>, <<"myserver.com">>],
|
||||
args_desc = ["User name to check", "Server to check"],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
result_example = ok},
|
||||
#ejabberd_commands{name = check_password, tags = [accounts],
|
||||
desc = "Check if a password is correct",
|
||||
module = ?MODULE, function = check_password,
|
||||
@ -215,8 +213,7 @@ get_commands_spec() ->
|
||||
args_example = [<<"peter">>, <<"myserver.com">>, <<"secret">>],
|
||||
args_desc = ["User name to check", "Server to check", "Password to check"],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
result_example = ok},
|
||||
#ejabberd_commands{name = check_password_hash, tags = [accounts],
|
||||
desc = "Check if the password hash is correct",
|
||||
longdesc = "Allows hash methods from the Erlang/OTP "
|
||||
@ -229,8 +226,7 @@ get_commands_spec() ->
|
||||
args_desc = ["User name to check", "Server to check",
|
||||
"Password's hash value", "Name of hash method"],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
result_example = ok},
|
||||
#ejabberd_commands{name = change_password, tags = [accounts],
|
||||
desc = "Change the password of an account",
|
||||
module = ?MODULE, function = set_password,
|
||||
@ -239,8 +235,7 @@ get_commands_spec() ->
|
||||
args_desc = ["User name", "Server name",
|
||||
"New password for user"],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
result_example = ok},
|
||||
#ejabberd_commands{name = ban_account, tags = [accounts],
|
||||
desc = "Ban an account: kick sessions and set random password",
|
||||
module = ?MODULE, function = ban_account,
|
||||
@ -249,8 +244,7 @@ get_commands_spec() ->
|
||||
args_desc = ["User name to ban", "Server name",
|
||||
"Reason for banning user"],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
result_example = ok},
|
||||
#ejabberd_commands{name = num_resources, tags = [session],
|
||||
desc = "Get the number of resources of a user",
|
||||
module = ?MODULE, function = num_resources,
|
||||
@ -278,8 +272,7 @@ get_commands_spec() ->
|
||||
args_desc = ["User name", "Server name", "User's resource",
|
||||
"Reason for closing session"],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"},
|
||||
result_example = ok},
|
||||
#ejabberd_commands{name = status_num_host, tags = [session, statistics],
|
||||
desc = "Number of logged users with this status in host",
|
||||
policy = admin,
|
||||
|
@ -72,8 +72,7 @@ get_commands_spec() ->
|
||||
args_example = [],
|
||||
args_desc = [],
|
||||
result = {res, rescode},
|
||||
result_example = ok,
|
||||
result_desc = "Status code: 0 on success, 1 otherwise"}
|
||||
result_example = ok}
|
||||
].
|
||||
|
||||
update_sql() ->
|
||||
|
Loading…
Reference in New Issue
Block a user