mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
This commit is contained in:
parent
0093326f7d
commit
0503d899cf
@ -3145,14 +3145,7 @@ send_kickban_presence1(MJID, UJID, Reason, Code, Affiliation,
|
||||
StateData#state.users),
|
||||
SAffiliation = affiliation_to_list(Affiliation),
|
||||
BannedJIDString = jid:to_string(RealJID),
|
||||
case MJID /= <<"">> of
|
||||
true ->
|
||||
{ok, #user{nick = ActorNick}} =
|
||||
(?DICT):find(jid:tolower(MJID),
|
||||
StateData#state.users);
|
||||
false ->
|
||||
ActorNick = <<"">>
|
||||
end,
|
||||
ActorNick = get_actor_nick(MJID, StateData),
|
||||
lists:foreach(fun ({_LJID, Info}) ->
|
||||
JidAttrList = case Info#user.role == moderator orelse
|
||||
(StateData#state.config)#config.anonymous
|
||||
@ -3207,6 +3200,14 @@ send_kickban_presence1(MJID, UJID, Reason, Code, Affiliation,
|
||||
end,
|
||||
(?DICT):to_list(StateData#state.users)).
|
||||
|
||||
get_actor_nick(<<"">>, StateData) ->
|
||||
<<"">>;
|
||||
get_actor_nick(MJID, StateData) ->
|
||||
case (?DICT):find(jid:tolower(MJID), StateData#state.users) of
|
||||
{ok, #user{nick = ActorNick}} -> ActorNick;
|
||||
_ -> <<"">>
|
||||
end.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Owner stuff
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user