Skip to content

Commit

Permalink
Replace muc.example.com with conference.example.com in commands docs
Browse files Browse the repository at this point in the history
Second form matches what we use by default, and we seen some confusion
between those two when people try to adopt commands from docs to real
usage.
  • Loading branch information
prefiks committed Apr 23, 2024
1 parent da8c9f3 commit 73bcabd
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions src/mod_muc_admin.erl
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ get_commands_spec() ->
policy = admin,
module = ?MODULE, function = muc_online_rooms,
args_desc = ["MUC service, or `global` for all"],
args_example = ["muc.example.com"],
args_example = ["conference.example.com"],
result_desc = "List of rooms",
result_example = ["room1@muc.example.com", "room2@muc.example.com"],
result_example = ["room1@conference.example.com", "room2@conference.example.com"],
args = [{service, binary}],
args_rename = [{host, service}],
result = {rooms, {list, {room, string}}}},
Expand All @@ -110,11 +110,11 @@ get_commands_spec() ->
policy = admin,
module = ?MODULE, function = muc_online_rooms_by_regex,
args_desc = ["MUC service, or `global` for all",
"Regex pattern for room name"],
args_example = ["muc.example.com", "^prefix"],
"Regex pattern for room name"],
args_example = ["conference.example.com", "^prefix"],
result_desc = "List of rooms with summary",
result_example = [{"room1@muc.example.com", "true", 10},
{"room2@muc.example.com", "false", 10}],
result_example = [{"room1@conference.example.com", "true", 10},
{"room2@conference.example.com", "false", 10}],
args = [{service, binary}, {regex, binary}],
args_rename = [{host, service}],
result = {rooms, {list, {room, {tuple,
Expand All @@ -126,15 +126,15 @@ get_commands_spec() ->
desc = "Register a nick to a User JID in a MUC service",
module = ?MODULE, function = muc_register_nick,
args_desc = ["Nick", "User JID", "Service"],
args_example = [<<"Tim">>, <<"[email protected]">>, <<"muc.example.org">>],
args_example = [<<"Tim">>, <<"[email protected]">>, <<"conference.example.org">>],
args = [{nick, binary}, {jid, binary}, {service, binary}],
args_rename = [{host, service}],
result = {res, rescode}},
#ejabberd_commands{name = muc_unregister_nick, tags = [muc],
desc = "Unregister the nick registered by that account in the MUC service",
module = ?MODULE, function = muc_unregister_nick,
args_desc = ["User JID", "MUC service"],
args_example = [<<"[email protected]">>, <<"muc.example.org">>],
args_example = [<<"[email protected]">>, <<"conference.example.org">>],
args = [{jid, binary}, {service, binary}],
args_rename = [{host, service}],
result = {res, rescode}},
Expand All @@ -143,15 +143,15 @@ get_commands_spec() ->
desc = "Create a MUC room name@service in host",
module = ?MODULE, function = create_room,
args_desc = ["Room name", "MUC service", "Server host"],
args_example = ["room1", "muc.example.com", "example.com"],
args_example = ["room1", "conference.example.com", "example.com"],
args = [{name, binary}, {service, binary},
{host, binary}],
result = {res, rescode}},
#ejabberd_commands{name = destroy_room, tags = [muc_room],
desc = "Destroy a MUC room",
module = ?MODULE, function = destroy_room,
args_desc = ["Room name", "MUC service"],
args_example = ["room1", "muc.example.com"],
args_example = ["room1", "conference.example.com"],
args = [{name, binary}, {service, binary}],
result = {res, rescode}},
#ejabberd_commands{name = create_rooms_file, tags = [muc],
Expand All @@ -169,7 +169,7 @@ get_commands_spec() ->
"The syntax of `subscribers` is: `JID:Nick:Node:Node2:Node3,JID:Nick:Node`.",
module = ?MODULE, function = create_room_with_opts,
args_desc = ["Room name", "MUC service", "Server host", "List of options"],
args_example = ["room1", "muc.example.com", "localhost",
args_example = ["room1", "conference.example.com", "localhost",
[{"members_only","true"},
{"affiliations", "owner:[email protected],member:[email protected]"},
{"subscribers", "[email protected]:Bob:messages:subject,[email protected]:Anne:messages"}]],
Expand Down Expand Up @@ -197,9 +197,9 @@ get_commands_spec() ->
" The MUC service argument can be `global` to get all hosts.",
module = ?MODULE, function = rooms_unused_list,
args_desc = ["MUC service, or `global` for all", "Number of days"],
args_example = ["muc.example.com", 31],
args_example = ["conference.example.com", 31],
result_desc = "List of unused rooms",
result_example = ["room1@muc.example.com", "room2@muc.example.com"],
result_example = ["room1@conference.example.com", "room2@conference.example.com"],
args = [{service, binary}, {days, integer}],
args_rename = [{host, service}],
result = {rooms, {list, {room, string}}}},
Expand All @@ -210,9 +210,9 @@ get_commands_spec() ->
" The MUC service argument can be `global` to get all hosts.",
module = ?MODULE, function = rooms_unused_destroy,
args_desc = ["MUC service, or `global` for all", "Number of days"],
args_example = ["muc.example.com", 31],
args_example = ["conference.example.com", 31],
result_desc = "List of unused rooms that has been destroyed",
result_example = ["room1@muc.example.com", "room2@muc.example.com"],
result_example = ["room1@conference.example.com", "room2@conference.example.com"],
args = [{service, binary}, {days, integer}],
args_rename = [{host, service}],
result = {rooms, {list, {room, string}}}},
Expand All @@ -222,9 +222,9 @@ get_commands_spec() ->
longdesc = "The MUC service argument can be `global` to get all hosts.",
module = ?MODULE, function = rooms_empty_list,
args_desc = ["MUC service, or `global` for all"],
args_example = ["muc.example.com"],
args_example = ["conference.example.com"],
result_desc = "List of empty rooms",
result_example = ["room1@muc.example.com", "room2@muc.example.com"],
result_example = ["room1@conference.example.com", "room2@conference.example.com"],
args = [{service, binary}],
args_rename = [{host, service}],
result = {rooms, {list, {room, string}}}},
Expand All @@ -233,9 +233,9 @@ get_commands_spec() ->
longdesc = "The MUC service argument can be `global` to get all hosts.",
module = ?MODULE, function = rooms_empty_destroy,
args_desc = ["MUC service, or `global` for all"],
args_example = ["muc.example.com"],
args_example = ["conference.example.com"],
result_desc = "List of empty rooms that have been destroyed",
result_example = ["room1@muc.example.com", "room2@muc.example.com"],
result_example = ["room1@conference.example.com", "room2@conference.example.com"],
args = [{service, binary}],
args_rename = [{host, service}],
result = {rooms, {list, {room, string}}}},
Expand All @@ -245,7 +245,7 @@ get_commands_spec() ->
module = ?MODULE, function = get_user_rooms,
args_desc = ["Username", "Server host"],
args_example = ["tom", "example.com"],
result_example = ["room1@muc.example.com", "room2@muc.example.com"],
result_example = ["room1@conference.example.com", "room2@conference.example.com"],
args = [{user, binary}, {host, binary}],
result = {rooms, {list, {room, string}}}},
#ejabberd_commands{name = get_user_subscriptions, tags = [muc, muc_sub],
Expand All @@ -254,7 +254,7 @@ get_commands_spec() ->
module = ?MODULE, function = get_user_subscriptions,
args_desc = ["Username", "Server host"],
args_example = ["tom", "example.com"],
result_example = [{"room1@muc.example.com", "Tommy", ["mucsub:config"]}],
result_example = [{"room1@conference.example.com", "Tommy", ["mucsub:config"]}],
args = [{user, binary}, {host, binary}],
result = {rooms,
{list,
Expand All @@ -270,7 +270,7 @@ get_commands_spec() ->
desc = "Get the list of occupants of a MUC room",
module = ?MODULE, function = get_room_occupants,
args_desc = ["Room name", "MUC service"],
args_example = ["room1", "muc.example.com"],
args_example = ["room1", "conference.example.com"],
result_desc = "The list of occupants with JID, nick and affiliation",
result_example = [{"[email protected]/psi", "User 1", "owner"}],
args = [{name, binary}, {service, binary}],
Expand All @@ -286,7 +286,7 @@ get_commands_spec() ->
desc = "Get the number of occupants of a MUC room",
module = ?MODULE, function = get_room_occupants_number,
args_desc = ["Room name", "MUC service"],
args_example = ["room1", "muc.example.com"],
args_example = ["room1", "conference.example.com"],
result_desc = "Number of room occupants",
result_example = 7,
args = [{name, binary}, {service, binary}],
Expand All @@ -302,7 +302,7 @@ get_commands_spec() ->
module = ?MODULE, function = send_direct_invitation,
args_desc = ["Room name", "MUC service", "Password, or `none`",
"Reason text, or `none`", "Users JIDs separated with `:` characters"],
args_example = [<<"room1">>, <<"muc.example.com">>,
args_example = [<<"room1">>, <<"conference.example.com">>,
<<>>, <<"Check this out!">>,
"user2@localhost:[email protected]"],
args = [{name, binary}, {service, binary}, {password, binary},
Expand All @@ -319,7 +319,7 @@ get_commands_spec() ->
note = "updated in 24.02",
args_desc = ["Room name", "MUC service", "Password, or `none`",
"Reason text, or `none`", "List of users JIDs"],
args_example = [<<"room1">>, <<"muc.example.com">>,
args_example = [<<"room1">>, <<"conference.example.com">>,
<<>>, <<"Check this out!">>,
["user2@localhost", "[email protected]"]],
args = [{name, binary}, {service, binary}, {password, binary},
Expand All @@ -330,15 +330,15 @@ get_commands_spec() ->
desc = "Change an option in a MUC room",
module = ?MODULE, function = change_room_option,
args_desc = ["Room name", "MUC service", "Option name", "Value to assign"],
args_example = ["room1", "muc.example.com", "members_only", "true"],
args_example = ["room1", "conference.example.com", "members_only", "true"],
args = [{name, binary}, {service, binary},
{option, binary}, {value, binary}],
result = {res, rescode}},
#ejabberd_commands{name = get_room_options, tags = [muc_room],
desc = "Get options from a MUC room",
module = ?MODULE, function = get_room_options,
args_desc = ["Room name", "MUC service"],
args_example = ["room1", "muc.example.com"],
args_example = ["room1", "conference.example.com"],
result_desc = "List of room options tuples with name and value",
result_example = [{"members_only", "true"}],
args = [{name, binary}, {service, binary}],
Expand Down Expand Up @@ -434,7 +434,7 @@ get_commands_spec() ->
desc = "List subscribers of a MUC conference",
module = ?MODULE, function = get_subscribers,
args_desc = ["Room name", "MUC service"],
args_example = ["room1", "muc.example.com"],
args_example = ["room1", "conference.example.com"],
result_desc = "The list of users that are subscribed to that room",
result_example = ["[email protected]", "[email protected]"],
args = [{name, binary}, {service, binary}],
Expand All @@ -443,15 +443,15 @@ get_commands_spec() ->
desc = "Change an affiliation in a MUC room",
module = ?MODULE, function = set_room_affiliation,
args_desc = ["Room name", "MUC service", "User JID", "Affiliation to set"],
args_example = ["room1", "muc.example.com", "[email protected]", "member"],
args_example = ["room1", "conference.example.com", "[email protected]", "member"],
args = [{name, binary}, {service, binary},
{jid, binary}, {affiliation, binary}],
result = {res, rescode}},
#ejabberd_commands{name = get_room_affiliations, tags = [muc_room],
desc = "Get the list of affiliations of a MUC room",
module = ?MODULE, function = get_room_affiliations,
args_desc = ["Room name", "MUC service"],
args_example = ["room1", "muc.example.com"],
args_example = ["room1", "conference.example.com"],
result_desc = "The list of affiliations with username, domain, affiliation and reason",
result_example = [{"user1", "example.com", member, "member"}],
args = [{name, binary}, {service, binary}],
Expand All @@ -467,7 +467,7 @@ get_commands_spec() ->
desc = "Get affiliation of a user in MUC room",
module = ?MODULE, function = get_room_affiliation,
args_desc = ["Room name", "MUC service", "User JID"],
args_example = ["room1", "muc.example.com", "[email protected]"],
args_example = ["room1", "conference.example.com", "[email protected]"],
result_desc = "Affiliation of the user",
result_example = member,
args = [{name, binary}, {service, binary}, {jid, binary}],
Expand All @@ -477,7 +477,7 @@ get_commands_spec() ->
note = "added in 23.04",
module = ?MODULE, function = get_room_history,
args_desc = ["Room name", "MUC service"],
args_example = ["room1", "muc.example.com"],
args_example = ["room1", "conference.example.com"],
args = [{name, binary}, {service, binary}],
result = {history, {list,
{entry, {tuple,
Expand Down

0 comments on commit 73bcabd

Please sign in to comment.