mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
* src/msgs/ru.msg: Updated (thanks to Sergei Golovan)
* src/mod_muc/mod_muc_room.erl: Now private conferences are visible to admins and owners of this conference (thanks to Sergei Golovan) * src/mod_muc/mod_muc.erl: More xml:lang support (thanks to Sergei Golovan) * src/mod_vcard.erl: Better processing of EMAIL tag (thanks to Sergei Golovan) * src/ejabberd_s2s_out.erl: Added "catch" to "open_socket" (thanks to Sergei Golovan) SVN Revision: 211
This commit is contained in:
parent
36f90d6a2d
commit
bc672b44ea
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
|||||||
|
2004-03-08 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/msgs/ru.msg: Updated (thanks to Sergei Golovan)
|
||||||
|
|
||||||
|
* src/mod_muc/mod_muc_room.erl: Now private conferences are
|
||||||
|
visible to admins and owners of this conference (thanks to Sergei
|
||||||
|
Golovan)
|
||||||
|
|
||||||
|
* src/mod_muc/mod_muc.erl: More xml:lang support (thanks to Sergei
|
||||||
|
Golovan)
|
||||||
|
|
||||||
|
* src/mod_vcard.erl: Better processing of EMAIL tag (thanks to
|
||||||
|
Sergei Golovan)
|
||||||
|
|
||||||
|
* src/ejabberd_s2s_out.erl: Added "catch" to "open_socket" (thanks
|
||||||
|
to Sergei Golovan)
|
||||||
|
|
||||||
2004-03-07 Alexey Shchepin <alexey@sevcom.net>
|
2004-03-07 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/web/ejabberd_http_poll.erl: Completed
|
* src/web/ejabberd_http_poll.erl: Completed
|
||||||
|
@ -114,7 +114,7 @@ open_socket(init, StateData) ->
|
|||||||
{ok, _Socket} = R -> R;
|
{ok, _Socket} = R -> R;
|
||||||
{error, Reason1} ->
|
{error, Reason1} ->
|
||||||
?DEBUG("s2s_out: connect return ~p~n", [Reason1]),
|
?DEBUG("s2s_out: connect return ~p~n", [Reason1]),
|
||||||
gen_tcp:connect(Addr, Port,
|
catch gen_tcp:connect(Addr, Port,
|
||||||
[binary, {packet, 0}, inet6])
|
[binary, {packet, 0}, inet6])
|
||||||
end,
|
end,
|
||||||
case Res of
|
case Res of
|
||||||
@ -130,6 +130,11 @@ open_socket(init, StateData) ->
|
|||||||
?DEBUG("s2s_out: inet6 connect return ~p~n", [Reason]),
|
?DEBUG("s2s_out: inet6 connect return ~p~n", [Reason]),
|
||||||
Error = ?ERR_REMOTE_SERVER_NOT_FOUND,
|
Error = ?ERR_REMOTE_SERVER_NOT_FOUND,
|
||||||
bounce_messages(Error),
|
bounce_messages(Error),
|
||||||
|
{stop, normal, StateData};
|
||||||
|
{'EXIT', Reason} ->
|
||||||
|
?DEBUG("s2s_out: inet6 connect crashed ~p~n", [Reason]),
|
||||||
|
Error = ?ERR_REMOTE_SERVER_NOT_FOUND,
|
||||||
|
bounce_messages(Error),
|
||||||
{stop, normal, StateData}
|
{stop, normal, StateData}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -280,19 +280,19 @@ iq_disco_info() ->
|
|||||||
{xmlelement, "feature", [{"var", ?NS_VCARD}], []}].
|
{xmlelement, "feature", [{"var", ?NS_VCARD}], []}].
|
||||||
|
|
||||||
|
|
||||||
process_iq_disco_items(Host, From, To, IQ) ->
|
process_iq_disco_items(Host, From, To, #iq{lang = Lang} = IQ) ->
|
||||||
Res = IQ#iq{type = result,
|
Res = IQ#iq{type = result,
|
||||||
sub_el = [{xmlelement, "query",
|
sub_el = [{xmlelement, "query",
|
||||||
[{"xmlns", ?NS_DISCO_ITEMS}],
|
[{"xmlns", ?NS_DISCO_ITEMS}],
|
||||||
iq_disco_items(Host, From)}]},
|
iq_disco_items(Host, From, Lang)}]},
|
||||||
ejabberd_router:route(To,
|
ejabberd_router:route(To,
|
||||||
From,
|
From,
|
||||||
jlib:iq_to_xml(Res)).
|
jlib:iq_to_xml(Res)).
|
||||||
|
|
||||||
iq_disco_items(Host, From) ->
|
iq_disco_items(Host, From, Lang) ->
|
||||||
lists:zf(fun(#muc_online_room{name = Name, pid = Pid}) ->
|
lists:zf(fun(#muc_online_room{name = Name, pid = Pid}) ->
|
||||||
case catch gen_fsm:sync_send_all_state_event(
|
case catch gen_fsm:sync_send_all_state_event(
|
||||||
Pid, {get_disco_item, From}, 100) of
|
Pid, {get_disco_item, From, Lang}, 100) of
|
||||||
{item, Desc} ->
|
{item, Desc} ->
|
||||||
{true,
|
{true,
|
||||||
{xmlelement, "item",
|
{xmlelement, "item",
|
||||||
|
@ -583,7 +583,7 @@ handle_event(Event, StateName, StateData) ->
|
|||||||
%% {stop, Reason, NewStateData} |
|
%% {stop, Reason, NewStateData} |
|
||||||
%% {stop, Reason, Reply, NewStateData}
|
%% {stop, Reason, Reply, NewStateData}
|
||||||
%%----------------------------------------------------------------------
|
%%----------------------------------------------------------------------
|
||||||
handle_sync_event({get_disco_item, JID}, From, StateName, StateData) ->
|
handle_sync_event({get_disco_item, JID, Lang}, From, StateName, StateData) ->
|
||||||
FAffiliation = get_affiliation(JID, StateData),
|
FAffiliation = get_affiliation(JID, StateData),
|
||||||
FRole = get_role(JID, StateData),
|
FRole = get_role(JID, StateData),
|
||||||
Tail =
|
Tail =
|
||||||
@ -592,12 +592,21 @@ handle_sync_event({get_disco_item, JID}, From, StateName, StateData) ->
|
|||||||
(FAffiliation == admin) orelse
|
(FAffiliation == admin) orelse
|
||||||
(FAffiliation == owner) of
|
(FAffiliation == owner) of
|
||||||
true ->
|
true ->
|
||||||
|
Desc = case (StateData#state.config)#config.public of
|
||||||
|
true ->
|
||||||
|
"";
|
||||||
|
_ ->
|
||||||
|
translate:translate(Lang, "private, ")
|
||||||
|
end,
|
||||||
Len = length(?DICT:to_list(StateData#state.users)),
|
Len = length(?DICT:to_list(StateData#state.users)),
|
||||||
" (" ++ integer_to_list(Len) ++ ")";
|
" (" ++ Desc ++ integer_to_list(Len) ++ ")";
|
||||||
_ ->
|
_ ->
|
||||||
""
|
""
|
||||||
end,
|
end,
|
||||||
Reply = case (StateData#state.config)#config.public of
|
Reply = case ((StateData#state.config)#config.public == true) orelse
|
||||||
|
(FRole /= none) orelse
|
||||||
|
(FAffiliation == admin) orelse
|
||||||
|
(FAffiliation == owner) of
|
||||||
true ->
|
true ->
|
||||||
{item, get_title(StateData) ++ Tail};
|
{item, get_title(StateData) ++ Tail};
|
||||||
_ ->
|
_ ->
|
||||||
|
@ -147,9 +147,16 @@ set_vcard(User, VCARD) ->
|
|||||||
BDay = xml:get_path_s(VCARD, [{elem, "BDAY"}, cdata]),
|
BDay = xml:get_path_s(VCARD, [{elem, "BDAY"}, cdata]),
|
||||||
CTRY = xml:get_path_s(VCARD, [{elem, "ADR"}, {elem, "CTRY"}, cdata]),
|
CTRY = xml:get_path_s(VCARD, [{elem, "ADR"}, {elem, "CTRY"}, cdata]),
|
||||||
Locality = xml:get_path_s(VCARD, [{elem, "ADR"}, {elem, "LOCALITY"},cdata]),
|
Locality = xml:get_path_s(VCARD, [{elem, "ADR"}, {elem, "LOCALITY"},cdata]),
|
||||||
EMail = xml:get_path_s(VCARD, [{elem, "EMAIL"}, cdata]),
|
EMail1 = xml:get_path_s(VCARD, [{elem, "EMAIL"}, {elem, "USERID"},cdata]),
|
||||||
|
EMail2 = xml:get_path_s(VCARD, [{elem, "EMAIL"}, cdata]),
|
||||||
OrgName = xml:get_path_s(VCARD, [{elem, "ORG"}, {elem, "ORGNAME"}, cdata]),
|
OrgName = xml:get_path_s(VCARD, [{elem, "ORG"}, {elem, "ORGNAME"}, cdata]),
|
||||||
OrgUnit = xml:get_path_s(VCARD, [{elem, "ORG"}, {elem, "ORGUNIT"}, cdata]),
|
OrgUnit = xml:get_path_s(VCARD, [{elem, "ORG"}, {elem, "ORGUNIT"}, cdata]),
|
||||||
|
EMail = case EMail1 of
|
||||||
|
"" ->
|
||||||
|
EMail2;
|
||||||
|
_ ->
|
||||||
|
EMail1
|
||||||
|
end,
|
||||||
|
|
||||||
LUser = jlib:nodeprep(User),
|
LUser = jlib:nodeprep(User),
|
||||||
LFN = stringprep:tolower(FN),
|
LFN = stringprep:tolower(FN),
|
||||||
|
@ -167,6 +167,7 @@
|
|||||||
{"Invalid affiliation: ~s", "Недопустимый ранг: ~s"}.
|
{"Invalid affiliation: ~s", "Недопустимый ранг: ~s"}.
|
||||||
{"Invalid role: ~s", "Недопустимая роль: ~s"}.
|
{"Invalid role: ~s", "Недопустимая роль: ~s"}.
|
||||||
{"Owner privileges required", "Требуются права владельца"}.
|
{"Owner privileges required", "Требуются права владельца"}.
|
||||||
|
{"private, ", "приватная, "}.
|
||||||
|
|
||||||
% mod_irc/mod_irc.erl
|
% mod_irc/mod_irc.erl
|
||||||
{"ejabberd IRC module\nCopyright (c) 2003-2004 Alexey Shchepin",
|
{"ejabberd IRC module\nCopyright (c) 2003-2004 Alexey Shchepin",
|
||||||
|
Loading…
Reference in New Issue
Block a user