mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Merge pull request #209 from weiss/rename-disconnect-user
Rename disconnect_user/2 command
This commit is contained in:
commit
23fdf0e889
@ -1364,7 +1364,7 @@ handle_info(replaced, StateName, StateData) ->
|
||||
Lang = StateData#state.lang,
|
||||
Xmlelement = ?SERRT_CONFLICT(Lang, <<"Replaced by new connection">>),
|
||||
handle_info({kick, replaced, Xmlelement}, StateName, StateData);
|
||||
handle_info(disconnect, StateName, StateData) ->
|
||||
handle_info(kick, StateName, StateData) ->
|
||||
Lang = StateData#state.lang,
|
||||
Xmlelement = ?SERRT_POLICY_VIOLATION(Lang, <<"has been kicked">>),
|
||||
handle_info({kick, kicked_by_admin, Xmlelement}, StateName, StateData);
|
||||
|
@ -54,7 +54,7 @@
|
||||
connected_users/0,
|
||||
connected_users_number/0,
|
||||
user_resources/2,
|
||||
disconnect_user/2,
|
||||
kick_user/2,
|
||||
get_session_pid/3,
|
||||
get_user_info/3,
|
||||
get_user_ip/3,
|
||||
@ -822,10 +822,10 @@ commands() ->
|
||||
module = ?MODULE, function = user_resources,
|
||||
args = [{user, binary}, {host, binary}],
|
||||
result = {resources, {list, {resource, string}}}},
|
||||
#ejabberd_commands{name = disconnect_user,
|
||||
#ejabberd_commands{name = kick_user,
|
||||
tags = [session],
|
||||
desc = "Disconnect user's active sessions",
|
||||
module = ?MODULE, function = disconnect_user,
|
||||
module = ?MODULE, function = kick_user,
|
||||
args = [{user, binary}, {host, binary}],
|
||||
result = {num_resources, integer}}].
|
||||
|
||||
@ -844,7 +844,7 @@ user_resources(User, Server) ->
|
||||
Resources = get_user_resources(User, Server),
|
||||
lists:sort(Resources).
|
||||
|
||||
disconnect_user(User, Server) ->
|
||||
kick_user(User, Server) ->
|
||||
Resources = get_user_resources(User, Server),
|
||||
lists:foreach(
|
||||
fun(Resource) ->
|
||||
|
Loading…
Reference in New Issue
Block a user