mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
Rename remaining command arguments from Server to Host (#2908)
This commit is contained in:
parent
fb77e2e8c0
commit
c318b5f8a2
@ -374,7 +374,7 @@ get_command_format(Name, Auth, Version) ->
|
||||
case Policy of
|
||||
user when Admin;
|
||||
Auth == noauth ->
|
||||
{[{user, binary}, {server, binary} | Args], Rename, Result};
|
||||
{[{user, binary}, {host, binary} | Args], Rename, Result};
|
||||
_ ->
|
||||
{Args, Rename, Result}
|
||||
end.
|
||||
|
@ -399,7 +399,8 @@ get_commands_spec() ->
|
||||
"connected)\n\n'status' is a free text "
|
||||
"defined by the user client.",
|
||||
module = ?MODULE, function = get_presence,
|
||||
args = [{user, binary}, {server, binary}],
|
||||
args = [{user, binary}, {host, binary}],
|
||||
args_rename = [{server, host}],
|
||||
args_example = [<<"peter">>, <<"myexample.com">>],
|
||||
args_desc = ["User name", "Server name"],
|
||||
result_example = {<<"user1@myserver.com/tka">>, <<"dnd">>, <<"Busy">>},
|
||||
@ -485,10 +486,11 @@ get_commands_spec() ->
|
||||
desc = "Add an item to a user's roster (supports ODBC)",
|
||||
longdesc = "Group can be several groups separated by ; for example: \"g1;g2;g3\"",
|
||||
module = ?MODULE, function = add_rosteritem,
|
||||
args = [{localuser, binary}, {localserver, binary},
|
||||
{user, binary}, {server, binary},
|
||||
args = [{localuser, binary}, {localhost, binary},
|
||||
{user, binary}, {host, binary},
|
||||
{nick, binary}, {group, binary},
|
||||
{subs, binary}],
|
||||
args_rename = [{localserver, localhost}, {server, host}],
|
||||
args_example = [<<"user1">>,<<"myserver.com">>,<<"user2">>, <<"myserver.com">>,
|
||||
<<"User 2">>, <<"Friends">>, <<"both">>],
|
||||
args_desc = ["User name", "Server name", "Contact user name", "Contact server name",
|
||||
@ -500,8 +502,9 @@ get_commands_spec() ->
|
||||
#ejabberd_commands{name = delete_rosteritem, tags = [roster],
|
||||
desc = "Delete an item from a user's roster (supports ODBC)",
|
||||
module = ?MODULE, function = delete_rosteritem,
|
||||
args = [{localuser, binary}, {localserver, binary},
|
||||
{user, binary}, {server, binary}],
|
||||
args = [{localuser, binary}, {localhost, binary},
|
||||
{user, binary}, {host, binary}],
|
||||
args_rename = [{localserver, localhost}, {server, host}],
|
||||
args_example = [<<"user1">>,<<"myserver.com">>,<<"user2">>, <<"myserver.com">>],
|
||||
args_desc = ["User name", "Server name", "Contact user name", "Contact server name"],
|
||||
result = {res, rescode}},
|
||||
@ -569,6 +572,7 @@ get_commands_spec() ->
|
||||
policy = user,
|
||||
module = ?MODULE, function = get_roster,
|
||||
args = [],
|
||||
args_rename = [{server, host}],
|
||||
result = {contacts, {list, {contact, {tuple, [
|
||||
{jid, string},
|
||||
{nick, string},
|
||||
@ -720,6 +724,7 @@ get_commands_spec() ->
|
||||
policy = user,
|
||||
module = mod_offline, function = count_offline_messages,
|
||||
args = [],
|
||||
args_rename = [{server, host}],
|
||||
result_example = 5,
|
||||
result_desc = "Number",
|
||||
result = {value, integer}},
|
||||
|
@ -1369,7 +1369,8 @@ get_commands_spec() ->
|
||||
#ejabberd_commands{name = remove_mam_for_user, tags = [mam],
|
||||
desc = "Remove mam archive for user",
|
||||
module = ?MODULE, function = remove_mam_for_user,
|
||||
args = [{user, binary}, {server, binary}],
|
||||
args = [{user, binary}, {host, binary}],
|
||||
args_rename = [{server, host}],
|
||||
args_desc = ["Username", "Server"],
|
||||
args_example = [<<"bob">>, <<"example.com">>],
|
||||
result = {res, restuple},
|
||||
@ -1378,7 +1379,8 @@ get_commands_spec() ->
|
||||
#ejabberd_commands{name = remove_mam_for_user_with_peer, tags = [mam],
|
||||
desc = "Remove mam archive for user with peer",
|
||||
module = ?MODULE, function = remove_mam_for_user_with_peer,
|
||||
args = [{user, binary}, {server, binary}, {with, binary}],
|
||||
args = [{user, binary}, {host, binary}, {with, binary}],
|
||||
args_rename = [{server, host}],
|
||||
args_desc = ["Username", "Server", "Peer"],
|
||||
args_example = [<<"bob">>, <<"example.com">>, <<"anne@example.com">>],
|
||||
result = {res, restuple},
|
||||
|
@ -285,7 +285,8 @@ get_commands_spec() ->
|
||||
[#ejabberd_commands{name = bookmarks_to_pep, tags = [private],
|
||||
desc = "Export private XML storage bookmarks to PEP",
|
||||
module = ?MODULE, function = bookmarks_to_pep,
|
||||
args = [{user, binary}, {server, binary}],
|
||||
args = [{user, binary}, {host, binary}],
|
||||
args_rename = [{server, host}],
|
||||
args_desc = ["Username", "Server"],
|
||||
args_example = [<<"bob">>, <<"example.com">>],
|
||||
result = {res, restuple},
|
||||
|
Loading…
Reference in New Issue
Block a user