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/mod_muc/mod_muc.erl: Likewise SVN Revision: 118
This commit is contained in:
parent
081c698731
commit
8bee1ad5a6
@ -1,3 +1,8 @@
|
||||
2003-06-30 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/mod_muc/mod_muc_room.erl: Fixed room destroying
|
||||
* src/mod_muc/mod_muc.erl: Likewise
|
||||
|
||||
2003-06-29 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/jlib.hrl: Error stanzas updated to confirm latest xmpp-core
|
||||
|
@ -63,7 +63,8 @@ loop(Host) ->
|
||||
end,
|
||||
loop(Host);
|
||||
{room_destroyed, Room} ->
|
||||
ets:delete(muc_online_room, Room);
|
||||
ets:delete(muc_online_room, Room),
|
||||
loop(Host);
|
||||
stop ->
|
||||
% TODO
|
||||
ejabberd_router:unregister_global_route(Host),
|
||||
@ -169,7 +170,7 @@ do_route(Host, From, To, Packet) ->
|
||||
ok;
|
||||
_ ->
|
||||
Err = jlib:make_error_reply(
|
||||
Packet, ?ERR_JID_NOT_FOUND),
|
||||
Packet, ?ERR_ITEM_NOT_FOUND),
|
||||
ejabberd_router:route(To, From, Err)
|
||||
end
|
||||
end;
|
||||
|
@ -295,7 +295,12 @@ normal_state({route, From, "",
|
||||
""},
|
||||
From,
|
||||
jlib:iq_to_xml(IQRes)),
|
||||
{next_state, normal_state, NewStateData};
|
||||
case NewStateData of
|
||||
stop ->
|
||||
{stop, normal, StateData};
|
||||
_ ->
|
||||
{next_state, normal_state, NewStateData}
|
||||
end;
|
||||
_ ->
|
||||
Err = jlib:make_error_reply(
|
||||
Packet, ?ERR_FEATURE_NOT_IMPLEMENTED),
|
||||
@ -419,7 +424,14 @@ normal_state({route, From, Nick,
|
||||
end,
|
||||
%io:format("STATE1: ~p~n", [?DICT:to_list(StateData#state.users)]),
|
||||
%io:format("STATE2: ~p~n", [?DICT:to_list(StateData1#state.users)]),
|
||||
{next_state, normal_state, StateData1};
|
||||
|
||||
case (not (StateData1#state.config)#config.persistent) andalso
|
||||
(?DICT:to_list(StateData1#state.users) == []) of
|
||||
true ->
|
||||
{stop, normal, StateData1};
|
||||
_ ->
|
||||
{next_state, normal_state, StateData1}
|
||||
end;
|
||||
|
||||
normal_state({route, From, ToNick,
|
||||
{xmlelement, "message", Attrs, Els} = Packet},
|
||||
@ -447,7 +459,7 @@ normal_state({route, From, ToNick,
|
||||
case find_jid_by_nick(ToNick, StateData) of
|
||||
false ->
|
||||
Err = jlib:make_error_reply(
|
||||
Packet, ?ERR_JID_NOT_FOUND),
|
||||
Packet, ?ERR_ITEM_NOT_FOUND),
|
||||
ejabberd_router:route(
|
||||
{StateData#state.room,
|
||||
StateData#state.host,
|
||||
@ -484,7 +496,7 @@ normal_state({route, From, ToNick,
|
||||
case find_jid_by_nick(ToNick, StateData) of
|
||||
false ->
|
||||
Err = jlib:make_error_reply(
|
||||
Packet, ?ERR_JID_NOT_FOUND),
|
||||
Packet, ?ERR_ITEM_NOT_FOUND),
|
||||
ejabberd_router:route(
|
||||
{StateData#state.room, StateData#state.host, ToNick},
|
||||
From, Err);
|
||||
@ -1787,7 +1799,7 @@ destroy_room(DEls, StateData) ->
|
||||
Info#user.jid,
|
||||
Packet)
|
||||
end, ?DICT:to_list(StateData#state.users)),
|
||||
{result, [], StateData}.
|
||||
{result, [], stop}.
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user