Update kick_session to work with ejabberd master
This commit is contained in:
parent
40459ec650
commit
ab0220ae1d
|
@ -778,14 +778,11 @@ set_password_auth(User, Server, Password) ->
|
|||
ok = ejabberd_auth:set_password(User, Server, Password).
|
||||
|
||||
prepare_reason([]) ->
|
||||
"Kicked by administrator";
|
||||
<<"Kicked by administrator">>;
|
||||
prepare_reason([Reason]) ->
|
||||
Reason;
|
||||
prepare_reason(Reason) when is_list(Reason) ->
|
||||
Reason;
|
||||
prepare_reason(StringList) ->
|
||||
string:join(StringList, "_").
|
||||
|
||||
prepare_reason(Reason) when is_binary(Reason) ->
|
||||
Reason.
|
||||
|
||||
%%%
|
||||
%%% Sessions
|
||||
|
@ -811,7 +808,7 @@ kick_this_session(User, Server, Resource, Reason) ->
|
|||
ejabberd_router:route(
|
||||
jlib:make_jid(<<>>, <<>>, <<>>),
|
||||
jlib:make_jid(User, Server, Resource),
|
||||
{xmlel, <<"broadcast">>, [], [{exit, Reason}]}).
|
||||
{broadcast, {exit, Reason}}).
|
||||
|
||||
|
||||
status_num(Host, Status) ->
|
||||
|
|
Loading…
Reference in New Issue