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

Varied fixes in mod_muc_room

This commit is contained in:
Badlop 2010-06-21 23:32:16 +02:00
parent a610d8b699
commit 7a76cabe26

View File

@ -343,7 +343,7 @@ normal_state({route, From, undefined,
#xmlel{name = 'iq'} = Packet}, #xmlel{name = 'iq'} = Packet},
StateData) -> StateData) ->
case exmpp_iq:xmlel_to_iq(Packet) of case exmpp_iq:xmlel_to_iq(Packet) of
#iq{type = Type, ns = XMLNS, lang = Lang, payload = SubEl} = IQ when #iq{kind = request, type = Type, ns = XMLNS, lang = Lang, payload = SubEl} = IQ when
(XMLNS == ?NS_MUC_ADMIN) or (XMLNS == ?NS_MUC_ADMIN) or
(XMLNS == ?NS_MUC_OWNER) or (XMLNS == ?NS_MUC_OWNER) or
(XMLNS == ?NS_DISCO_INFO) or (XMLNS == ?NS_DISCO_INFO) or
@ -381,7 +381,7 @@ normal_state({route, From, undefined,
_ -> _ ->
{next_state, normal_state, NewStateData} {next_state, normal_state, NewStateData}
end; end;
reply -> #iq{kind = response} ->
{next_state, normal_state, StateData}; {next_state, normal_state, StateData};
_ -> _ ->
Err = exmpp_stanza:reply_with_error(Packet, 'feature-not-implemented'), Err = exmpp_stanza:reply_with_error(Packet, 'feature-not-implemented'),
@ -1592,7 +1592,7 @@ add_new_user(From, Nick, Packet, StateData) ->
StateData#state.server_host, StateData#state.server_host,
mod_muc, max_user_conferences, 10), mod_muc, max_user_conferences, 10),
case {(ServiceAffiliation == owner orelse case {(ServiceAffiliation == owner orelse
MaxUsers == none orelse MaxUsers < 0 orelse
((Affiliation == admin orelse Affiliation == owner) andalso ((Affiliation == admin orelse Affiliation == owner) andalso
NUsers < MaxAdminUsers) orelse NUsers < MaxAdminUsers) orelse
NUsers < MaxUsers) andalso NUsers < MaxUsers) andalso