25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Added command to list all the vhosts registered in an ejabberd node

This commit is contained in:
Remco Wendt 2012-12-03 16:16:33 +01:00 committed by Alexey Shchepin
parent 1f290c8a29
commit d81eb95cab

View File

@ -31,6 +31,7 @@
%% Server
status/0, reopen_log/0,
stop_kindly/2, send_service_message_all_mucs/2,
registered_vhosts/0,
%% Erlang
update_list/0, update/1,
%% Accounts
@ -128,6 +129,11 @@ commands() ->
module = ?MODULE, function = registered_users,
args = [{host, string}],
result = {users, {list, {username, string}}}},
#ejabberd_commands{name = registered_vhosts, tags = [server],
desc = "List all registered vhosts in SERVER",
module = ?MODULE, function = registered_vhosts,
args = [],
result = {vhosts, {list, {vhost, string}}}},
#ejabberd_commands{name = import_file, tags = [mnesia],
desc = "Import user data from jabberd14 spool file",
@ -348,6 +354,8 @@ registered_users(Host) ->
SUsers = lists:sort(Users),
lists:map(fun({U, _S}) -> U end, SUsers).
registered_vhosts() ->
?MYHOSTS.
%%%
%%% Migration management