Skip to content

Commit

Permalink
Added command to list all the vhosts registered in an ejabberd node
Browse files Browse the repository at this point in the history
  • Loading branch information
shanx authored and alexeyshch committed Dec 19, 2012
1 parent 1f290c8 commit d81eb95
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ejabberd_admin.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -348,6 +354,8 @@ registered_users(Host) ->
SUsers = lists:sort(Users),
lists:map(fun({U, _S}) -> U end, SUsers).

registered_vhosts() ->
?MYHOSTS.

%%%
%%% Migration management
Expand Down

0 comments on commit d81eb95

Please sign in to comment.