From ab0220ae1dd269f6e080d9b99a3cd0ec084cab13 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 7 May 2014 18:44:48 +0200 Subject: [PATCH] Update kick_session to work with ejabberd master --- mod_admin_extra/src/mod_admin_extra.erl | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mod_admin_extra/src/mod_admin_extra.erl b/mod_admin_extra/src/mod_admin_extra.erl index 28918c0..bde90f7 100644 --- a/mod_admin_extra/src/mod_admin_extra.erl +++ b/mod_admin_extra/src/mod_admin_extra.erl @@ -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) ->