mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
* src/ejabberd_s2s.erl: Added error catching for do_route/3
* src/ejabberd_local.erl: Likewise for do_route/4 * src/msgs/ru.msg: Updated * src/mod_muc/mod_muc_room.erl: New option to allow to view list of participants for non-ones via disco#items * src/mod_muc/mod_muc_room.erl: Store room subject with configuration options SVN Revision: 109
This commit is contained in:
parent
2d3aa901a9
commit
ee15945cd7
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2003-05-15 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/ejabberd_s2s.erl: Added error catching for do_route/3
|
||||||
|
* src/ejabberd_local.erl: Likewise for do_route/4
|
||||||
|
|
||||||
|
* src/msgs/ru.msg: Updated
|
||||||
|
|
||||||
|
* src/mod_muc/mod_muc_room.erl: New option to allow to view list
|
||||||
|
of participants for non-ones via disco#items
|
||||||
|
|
||||||
|
* src/mod_muc/mod_muc_room.erl: Store room subject with
|
||||||
|
configuration options
|
||||||
|
|
||||||
2003-05-14 Alexey Shchepin <alexey@sevcom.net>
|
2003-05-14 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/mod_muc/mod_muc_room.erl: Remove user from room on receiving
|
* src/mod_muc/mod_muc_room.erl: Remove user from room on receiving
|
||||||
|
16
TODO
16
TODO
@ -6,15 +6,21 @@ admin interface
|
|||||||
node restart/shutdown
|
node restart/shutdown
|
||||||
statistics about memory usage
|
statistics about memory usage
|
||||||
backup management
|
backup management
|
||||||
S2S timeouts
|
|
||||||
rewrite S2S key validation
|
S2S:
|
||||||
iq:browse (?)
|
* timeouts
|
||||||
|
|
||||||
|
* rewrite S2S key validation
|
||||||
|
|
||||||
more correctly work with SRV DNS records (priority, weight, etc...)
|
more correctly work with SRV DNS records (priority, weight, etc...)
|
||||||
SSL
|
SSL
|
||||||
SASL
|
|
||||||
JEP-62,63 (?)
|
JEP-62,63 (?)
|
||||||
make roster set to work in one transaction
|
make roster set to work in one transaction
|
||||||
add traffic shapers to to c2s connection before authentification
|
add traffic shapers to c2s connection before authentification
|
||||||
add traffic shapers to s2s connections
|
add traffic shapers to s2s connections
|
||||||
more traffic shapers
|
more traffic shapers
|
||||||
SNMP
|
SNMP
|
||||||
|
|
||||||
|
mod_muc:
|
||||||
|
|
||||||
|
* broadcast messages from admin
|
||||||
|
@ -37,7 +37,12 @@ init() ->
|
|||||||
loop(State) ->
|
loop(State) ->
|
||||||
receive
|
receive
|
||||||
{route, From, To, Packet} ->
|
{route, From, To, Packet} ->
|
||||||
do_route(State, From, To, Packet),
|
case catch do_route(State, From, To, Packet) of
|
||||||
|
{'EXIT', Reason} ->
|
||||||
|
?ERROR_MSG("~p", [Reason]);
|
||||||
|
_ ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
loop(State);
|
loop(State);
|
||||||
{register_iq_handler, XMLNS, Module, Function} ->
|
{register_iq_handler, XMLNS, Module, Function} ->
|
||||||
ets:insert(State#state.iqtable, {XMLNS, Module, Function}),
|
ets:insert(State#state.iqtable, {XMLNS, Module, Function}),
|
||||||
|
@ -55,7 +55,12 @@ loop() ->
|
|||||||
clean_table_from_bad_node(Node),
|
clean_table_from_bad_node(Node),
|
||||||
loop();
|
loop();
|
||||||
{route, From, To, Packet} ->
|
{route, From, To, Packet} ->
|
||||||
do_route(From, To, Packet),
|
case catch do_route(From, To, Packet) of
|
||||||
|
{'EXIT', Reason} ->
|
||||||
|
?ERROR_MSG("~p", [Reason]);
|
||||||
|
_ ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
loop();
|
loop();
|
||||||
_ ->
|
_ ->
|
||||||
loop()
|
loop()
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
allow_query_users = true,
|
allow_query_users = true,
|
||||||
allow_private_messages = true,
|
allow_private_messages = true,
|
||||||
public = true,
|
public = true,
|
||||||
|
public_list = true,
|
||||||
persistent = false,
|
persistent = false,
|
||||||
moderated = false, % TODO
|
moderated = false, % TODO
|
||||||
members_by_default = true,
|
members_by_default = true,
|
||||||
@ -146,10 +147,20 @@ normal_state({route, From, "",
|
|||||||
case can_change_subject(Role,
|
case can_change_subject(Role,
|
||||||
StateData) of
|
StateData) of
|
||||||
true ->
|
true ->
|
||||||
{StateData#state{
|
NSD =
|
||||||
subject = Subject,
|
StateData#state{
|
||||||
subject_author = FromNick},
|
subject = Subject,
|
||||||
true};
|
subject_author =
|
||||||
|
FromNick},
|
||||||
|
case (NSD#state.config)#config.persistent of
|
||||||
|
true ->
|
||||||
|
mod_muc:store_room(
|
||||||
|
NSD#state.room,
|
||||||
|
make_opts(NSD));
|
||||||
|
_ ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
|
{NSD, true};
|
||||||
_ ->
|
_ ->
|
||||||
{StateData, false}
|
{StateData, false}
|
||||||
end
|
end
|
||||||
@ -272,7 +283,7 @@ normal_state({route, From, "",
|
|||||||
{{iq, ID, result, XMLNS,
|
{{iq, ID, result, XMLNS,
|
||||||
[{xmlelement, "query", [{"xmlns", XMLNS}],
|
[{xmlelement, "query", [{"xmlns", XMLNS}],
|
||||||
Res
|
Res
|
||||||
}]},
|
}]},
|
||||||
SD};
|
SD};
|
||||||
{error, Error} ->
|
{error, Error} ->
|
||||||
{{iq, ID, error, XMLNS,
|
{{iq, ID, error, XMLNS,
|
||||||
@ -1496,9 +1507,6 @@ process_iq_owner(From, set, SubEl, StateData) ->
|
|||||||
_ ->
|
_ ->
|
||||||
{error, ?ERR_FORBIDDEN}
|
{error, ?ERR_FORBIDDEN}
|
||||||
end;
|
end;
|
||||||
% {xmlelement, _, _, Items} = SubEl,
|
|
||||||
% process_admin_items_set(From, Items, StateData);
|
|
||||||
% {error, ?ERR_FEATURE_NOT_IMPLEMENTED};
|
|
||||||
|
|
||||||
process_iq_owner(From, get, SubEl, StateData) ->
|
process_iq_owner(From, get, SubEl, StateData) ->
|
||||||
FAffiliation = get_affiliation(From, StateData),
|
FAffiliation = get_affiliation(From, StateData),
|
||||||
@ -1567,6 +1575,9 @@ get_config(Lang, StateData) ->
|
|||||||
?BOOLXFIELD("Make room public searchable?",
|
?BOOLXFIELD("Make room public searchable?",
|
||||||
"public",
|
"public",
|
||||||
Config#config.public),
|
Config#config.public),
|
||||||
|
?BOOLXFIELD("Make participants list public?",
|
||||||
|
"public_list",
|
||||||
|
Config#config.public_list),
|
||||||
?BOOLXFIELD("Make room persistent?",
|
?BOOLXFIELD("Make room persistent?",
|
||||||
"persistent",
|
"persistent",
|
||||||
Config#config.persistent),
|
Config#config.persistent),
|
||||||
@ -1634,6 +1645,8 @@ set_xoption([{"allow_private_messages", [Val]} | Opts], Config) ->
|
|||||||
?SET_BOOL_XOPT(allow_private_messages, Val);
|
?SET_BOOL_XOPT(allow_private_messages, Val);
|
||||||
set_xoption([{"public", [Val]} | Opts], Config) ->
|
set_xoption([{"public", [Val]} | Opts], Config) ->
|
||||||
?SET_BOOL_XOPT(public, Val);
|
?SET_BOOL_XOPT(public, Val);
|
||||||
|
set_xoption([{"public_list", [Val]} | Opts], Config) ->
|
||||||
|
?SET_BOOL_XOPT(public_list, Val);
|
||||||
set_xoption([{"persistent", [Val]} | Opts], Config) ->
|
set_xoption([{"persistent", [Val]} | Opts], Config) ->
|
||||||
?SET_BOOL_XOPT(persistent, Val);
|
?SET_BOOL_XOPT(persistent, Val);
|
||||||
set_xoption([{"moderated", [Val]} | Opts], Config) ->
|
set_xoption([{"moderated", [Val]} | Opts], Config) ->
|
||||||
@ -1681,6 +1694,7 @@ set_opts([{Opt, Val} | Opts], StateData) ->
|
|||||||
?CASE_CONFIG_OPT(allow_query_users);
|
?CASE_CONFIG_OPT(allow_query_users);
|
||||||
?CASE_CONFIG_OPT(allow_private_messages);
|
?CASE_CONFIG_OPT(allow_private_messages);
|
||||||
?CASE_CONFIG_OPT(public);
|
?CASE_CONFIG_OPT(public);
|
||||||
|
?CASE_CONFIG_OPT(public_list);
|
||||||
?CASE_CONFIG_OPT(persistent);
|
?CASE_CONFIG_OPT(persistent);
|
||||||
?CASE_CONFIG_OPT(moderated);
|
?CASE_CONFIG_OPT(moderated);
|
||||||
?CASE_CONFIG_OPT(members_by_default);
|
?CASE_CONFIG_OPT(members_by_default);
|
||||||
@ -1691,6 +1705,10 @@ set_opts([{Opt, Val} | Opts], StateData) ->
|
|||||||
?CASE_CONFIG_OPT(logging);
|
?CASE_CONFIG_OPT(logging);
|
||||||
affiliations ->
|
affiliations ->
|
||||||
StateData#state{affiliations = ?DICT:from_list(Val)};
|
StateData#state{affiliations = ?DICT:from_list(Val)};
|
||||||
|
subject ->
|
||||||
|
StateData#state{subject = Val};
|
||||||
|
subject_author ->
|
||||||
|
StateData#state{subject_author = Val};
|
||||||
_ -> StateData
|
_ -> StateData
|
||||||
end,
|
end,
|
||||||
set_opts(Opts, NSD).
|
set_opts(Opts, NSD).
|
||||||
@ -1705,6 +1723,7 @@ make_opts(StateData) ->
|
|||||||
?MAKE_CONFIG_OPT(allow_query_users),
|
?MAKE_CONFIG_OPT(allow_query_users),
|
||||||
?MAKE_CONFIG_OPT(allow_private_messages),
|
?MAKE_CONFIG_OPT(allow_private_messages),
|
||||||
?MAKE_CONFIG_OPT(public),
|
?MAKE_CONFIG_OPT(public),
|
||||||
|
?MAKE_CONFIG_OPT(public_list),
|
||||||
?MAKE_CONFIG_OPT(persistent),
|
?MAKE_CONFIG_OPT(persistent),
|
||||||
?MAKE_CONFIG_OPT(moderated),
|
?MAKE_CONFIG_OPT(moderated),
|
||||||
?MAKE_CONFIG_OPT(members_by_default),
|
?MAKE_CONFIG_OPT(members_by_default),
|
||||||
@ -1713,7 +1732,9 @@ make_opts(StateData) ->
|
|||||||
?MAKE_CONFIG_OPT(password_protected),
|
?MAKE_CONFIG_OPT(password_protected),
|
||||||
?MAKE_CONFIG_OPT(anonymous),
|
?MAKE_CONFIG_OPT(anonymous),
|
||||||
?MAKE_CONFIG_OPT(logging),
|
?MAKE_CONFIG_OPT(logging),
|
||||||
{affiliations, ?DICT:to_list(StateData#state.affiliations)}
|
{affiliations, ?DICT:to_list(StateData#state.affiliations)},
|
||||||
|
{subject, StateData#state.subject},
|
||||||
|
{subject_author, StateData#state.subject_author}
|
||||||
].
|
].
|
||||||
|
|
||||||
|
|
||||||
@ -1760,8 +1781,9 @@ process_iq_disco_items(From, set, StateData) ->
|
|||||||
process_iq_disco_items(From, get, StateData) ->
|
process_iq_disco_items(From, get, StateData) ->
|
||||||
FAffiliation = get_affiliation(From, StateData),
|
FAffiliation = get_affiliation(From, StateData),
|
||||||
FRole = get_role(From, StateData),
|
FRole = get_role(From, StateData),
|
||||||
case (FRole /= none) or
|
case ((StateData#state.config)#config.public_list == true) orelse
|
||||||
(FAffiliation == admin) or
|
(FRole /= none) orelse
|
||||||
|
(FAffiliation == admin) orelse
|
||||||
(FAffiliation == owner) of
|
(FAffiliation == owner) of
|
||||||
true ->
|
true ->
|
||||||
UList =
|
UList =
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
{"Allow users to send private messages?",
|
{"Allow users to send private messages?",
|
||||||
"Разрешить приватные сообщения?"}.
|
"Разрешить приватные сообщения?"}.
|
||||||
{"Make room public searchable?", "Сделать комнату видимой всем?"}.
|
{"Make room public searchable?", "Сделать комнату видимой всем?"}.
|
||||||
|
{"Make participants list public?", "Сделать список участников видимым всем?"}.
|
||||||
{"Make room persistent?", "Сделать комнату постоянной?"}.
|
{"Make room persistent?", "Сделать комнату постоянной?"}.
|
||||||
{"Make room moderated?", "Сделать комнату модерируемой?"}.
|
{"Make room moderated?", "Сделать комнату модерируемой?"}.
|
||||||
{"Default users as members?",
|
{"Default users as members?",
|
||||||
|
Loading…
Reference in New Issue
Block a user