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