25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

* src/mod_muc/mod_muc_room.erl: Fixed room destroying

* src/ejabberd.cfg.example: Updated

* src/ejabberd_sm.erl: Fixed message routing when all resources
have negative priority

* src/msgs/*.msg: Updated (thanks to Sergei Golovan)

* src/web/ejabberd_web_admin.erl: Table titles now bold (thanks to
Sergei Golovan)

SVN Revision: 275
This commit is contained in:
Alexey Shchepin 2004-10-08 20:40:29 +00:00
parent f327b06ed7
commit 134dec5dbb
11 changed files with 150 additions and 23 deletions

View File

@ -1,3 +1,17 @@
2004-10-08 Alexey Shchepin <alexey@sevcom.net>
* src/mod_muc/mod_muc_room.erl: Fixed room destroying
* src/ejabberd.cfg.example: Updated
* src/ejabberd_sm.erl: Fixed message routing when all resources
have negative priority
* src/msgs/*.msg: Updated (thanks to Sergei Golovan)
* src/web/ejabberd_web_admin.erl: Table titles now bold (thanks to
Sergei Golovan)
2004-10-06 Alexey Shchepin <alexey@sevcom.net>
* doc/guide.tex: Updated

View File

@ -77,7 +77,7 @@ then prefix \jid{#1.} is added to main \ejabberd{} hostname.}
\author{Alexey Shchepin \\
\ahrefurl{mailto:alexey@sevcom.net} \\
\ahrefurl{xmpp:aleksey@jabber.ru}}
\date{June 24, 2004}
\date{October 8, 2004}
\begin{document}
\begin{titlepage}

View File

@ -75,12 +75,16 @@
% this line:
{auth_method, internal}.
% For LDAP uthentification use these lines instead of above one:
% For LDAP authentification use these lines instead of above one:
%{auth_method, ldap}.
%{ldap_servers, ["localhost"]}. % List of LDAP servers
%{ldap_uidattr, "uid"}. % LDAP attribute that holds user ID
%{ldap_base, "dc=example,dc=com"}. % Base of LDAP directory
% For authentification via external script use the following:
%{auth_method, external}.
%{extauth_program, "/path/to/authentification/script"}.
% Host name:
{host, "localhost"}.

View File

@ -260,7 +260,19 @@ do_route(From, To, Packet) ->
route_message(From, To, Packet) ->
LUser = To#jid.luser,
case catch lists:max(get_user_present_resources(LUser)) of
{'EXIT', _} ->
{Priority, R} when is_integer(Priority),
Priority >= 0 ->
LResource = jlib:resourceprep(R),
LUR = {LUser, LResource},
case mnesia:dirty_read({session, LUR}) of
[] ->
ok; % Race condition
[Sess] ->
Pid = Sess#session.pid,
?DEBUG("sending to process ~p~n", [Pid]),
Pid ! {route, From, To, Packet}
end;
_ ->
case xml:get_tag_attr_s("type", Packet) of
"error" ->
ok;
@ -274,17 +286,6 @@ route_message(From, To, Packet) ->
Packet, ?ERR_SERVICE_UNAVAILABLE),
ejabberd_router:route(To, From, Err)
end
end;
{_, R} ->
LResource = jlib:resourceprep(R),
LUR = {LUser, LResource},
case mnesia:dirty_read({session, LUR}) of
[] ->
ok; % Race condition
[Sess] ->
Pid = Sess#session.pid,
?DEBUG("sending to process ~p~n", [Pid]),
Pid ! {route, From, To, Packet}
end
end.

View File

@ -2126,6 +2126,12 @@ destroy_room(DEls, StateData) ->
Info#user.jid,
Packet)
end, ?DICT:to_list(StateData#state.users)),
case (StateData#state.config)#config.persistent of
true ->
mod_muc:forget_room(StateData#state.room);
false ->
ok
end,
{result, [], stop}.

View File

@ -220,7 +220,26 @@
{"Options", "Opciones"}.
{"Update", "Actualizar"}.
{"Delete", "Eliminar"}.
{"", ""}.
{"Add User", ""}.
{"ejabberd (c) 2002-2004 Alexey Shchepin, 2004 Process One", ""}.
{"Offline messages", ""}.
{"Last Activity", ""}.
{"Never", ""}.
{"~s offline messages queue", ""}.
{"Time", ""}.
{"From", ""}.
{"To", ""}.
{"Packet", ""}.
{"Offline messages:", ""}.
{"Roster", ""}.
{"Nickname", ""}.
{"Subscription", ""}.
{"Pending", ""}.
{"Groups", ""}.
{"Remove", ""}.
{"Add JID", ""}.
{"User ", ""}.
{"Roster of ", ""}.
% Local Variables:
% mode: erlang

View File

@ -226,7 +226,26 @@
{"Options", ""}.
{"Update", ""}.
{"Delete", ""}.
{"", ""}.
{"Add User", ""}.
{"ejabberd (c) 2002-2004 Alexey Shchepin, 2004 Process One", ""}.
{"Offline messages", ""}.
{"Last Activity", ""}.
{"Never", ""}.
{"~s offline messages queue", ""}.
{"Time", ""}.
{"From", ""}.
{"To", ""}.
{"Packet", ""}.
{"Offline messages:", ""}.
{"Roster", ""}.
{"Nickname", ""}.
{"Subscription", ""}.
{"Pending", ""}.
{"Groups", ""}.
{"Remove", ""}.
{"Add JID", ""}.
{"User ", ""}.
{"Roster of ", ""}.
% Local Variables:
% mode: erlang

View File

@ -248,7 +248,26 @@
{"Options", "Opties"}.
{"Update", "Bijwerken"}.
{"Delete", "Verwijderen"}.
{"", ""}.
{"Add User", ""}.
{"ejabberd (c) 2002-2004 Alexey Shchepin, 2004 Process One", ""}.
{"Offline messages", ""}.
{"Last Activity", ""}.
{"Never", ""}.
{"~s offline messages queue", ""}.
{"Time", ""}.
{"From", ""}.
{"To", ""}.
{"Packet", ""}.
{"Offline messages:", ""}.
{"Roster", ""}.
{"Nickname", ""}.
{"Subscription", ""}.
{"Pending", ""}.
{"Groups", ""}.
{"Remove", ""}.
{"Add JID", ""}.
{"User ", ""}.
{"Roster of ", ""}.
% Local Variables:
% mode: erlang

View File

@ -248,7 +248,26 @@
{"Options", "Параметры"}.
{"Update", "Обновить"}.
{"Delete", "Удалить"}.
{"", ""}.
{"Add User", "Добавить пользователя"}.
{"ejabberd (c) 2002-2004 Alexey Shchepin, 2004 Process One", "ejabberd (c) 2002-2004 Алексей Щепин, 2004 Process One"}.
{"Offline messages", "Офлайновые сообщения"}.
{"Last Activity", "Последнее подключение"}.
{"Never", "Никогда"}.
{"~s offline messages queue", "Oчередь офлайновых сообщений ~s"}.
{"Time", "Время"}.
{"From", "От кого"}.
{"To", "Кому"}.
{"Packet", "Пакет"}.
{"Offline messages:", "Офлайновые сообщения:"}.
{"Roster", "Ростер"}.
{"Nickname", "Псевдоним"}.
{"Subscription", "Подписка"}.
{"Pending", "Ожидание"}.
{"Groups", "Группы"}.
{"Remove", "Удалить"}.
{"Add JID", "Добавить JID"}.
{"User ", "Пользователь "}.
{"Roster of ", "Ростер пользователя "}.
% Local Variables:
% mode: erlang

View File

@ -248,7 +248,26 @@
{"Options", "Параметри"}.
{"Update", "Обновити"}.
{"Delete", "Видалити"}.
{"", ""}.
{"Add User", ""}.
{"ejabberd (c) 2002-2004 Alexey Shchepin, 2004 Process One", ""}.
{"Offline messages", ""}.
{"Last Activity", ""}.
{"Never", ""}.
{"~s offline messages queue", ""}.
{"Time", ""}.
{"From", ""}.
{"To", ""}.
{"Packet", ""}.
{"Offline messages:", ""}.
{"Roster", ""}.
{"Nickname", ""}.
{"Subscription", ""}.
{"Pending", ""}.
{"Groups", ""}.
{"Remove", ""}.
{"Add JID", ""}.
{"User ", ""}.
{"Roster of ", ""}.
% Local Variables:
% mode: erlang

View File

@ -324,6 +324,13 @@ select {
padding: 0.1em;
}
thead {
color: #000000;
background-color: #ffffff;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
font-weight: bold;
}
tr.head {
color: #ffffff;
@ -1226,7 +1233,7 @@ user_info(User, Query, Lang) ->
QueueLen = length(mnesia:dirty_read({offline_msg, User})),
FQueueLen = [?AC("queue/",
integer_to_list(QueueLen))],
[?XC("h1", "User: " ++ User)] ++
[?XC("h1", ?T("User ") ++ User)] ++
case Res of
ok -> [?CT("submitted"), ?P];
error -> [?CT("bad format"), ?P];
@ -1291,7 +1298,7 @@ user_queue(User, Query, Lang) ->
?XAE("td", [{"class", "valign"}], [?XC("pre", FPacket)])]
)
end, Msgs),
[?XC("h1", User ++ " offline messages queue")] ++
[?XC("h1", io_lib:format(?T("~s offline messages queue"), [User]))] ++
case Res of
ok -> [?CT("submitted"), ?P];
error -> [?CT("bad format"), ?P];
@ -1367,7 +1374,7 @@ user_roster(User, Query, Lang, Admin) ->
[?XE("thead",
[?XE("tr",
[?XCT("td", "JID"),
?XCT("td", "Name"),
?XCT("td", "Nickname"),
?XCT("td", "Subscription"),
?XCT("td", "Pending"),
?XCT("td", "Groups")
@ -1408,7 +1415,7 @@ user_roster(User, Query, Lang, Admin) ->
"Remove")])])
end, SItems))])]
end,
[?XC("h1", "Roster of " ++ User)] ++
[?XC("h1", ?T("Roster of ") ++ User)] ++
case Res of
ok -> [?CT("submitted"), ?P];
error -> [?CT("bad format"), ?P];