24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00

* src/mod_register.erl: When a registration is blocked due to IP

limitation, return description in error stanza (EJAB-692)

SVN Revision: 1487
This commit is contained in:
Badlop 2008-07-24 17:49:37 +00:00
parent 71e87aef6e
commit f841acb21f
2 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,9 @@
2008-07-23 Christophe Romain <christophe.romain@process-one.net> 2008-07-24 Badlop <badlop@process-one.net>
* src/mod_register.erl: When a registration is blocked due to IP
limitation, return description in error stanza (EJAB-692)
2008-07-24 Christophe Romain <christophe.romain@process-one.net>
* src/mod_pubsub/mod_pubsub.erl: Allow owner to subscribe/get its own * src/mod_pubsub/mod_pubsub.erl: Allow owner to subscribe/get its own
node (EJAB-705) node (EJAB-705)

View File

@ -167,7 +167,7 @@ process_iq(From, To,
IQ#iq{type = result, sub_el = [SubEl]}; IQ#iq{type = result, sub_el = [SubEl]};
_ -> _ ->
case try_register(User, Server, Password, case try_register(User, Server, Password,
Source) of Source, Lang) of
ok -> ok ->
IQ#iq{type = result, sub_el = [SubEl]}; IQ#iq{type = result, sub_el = [SubEl]};
{error, Error} -> {error, Error} ->
@ -195,7 +195,7 @@ process_iq(From, To,
end. end.
try_register(User, Server, Password, Source) -> try_register(User, Server, Password, Source, Lang) ->
case jlib:is_nodename(User) of case jlib:is_nodename(User) of
false -> false ->
{error, ?ERR_BAD_REQUEST}; {error, ?ERR_BAD_REQUEST};
@ -229,7 +229,9 @@ try_register(User, Server, Password, Source) ->
end end
end; end;
false -> false ->
{error, ?ERR_RESOURCE_CONSTRAINT} ErrText = "Users are not allowed to register "
"accounts so fast",
{error, ?ERRT_RESOURCE_CONSTRAINT(Lang, ErrText)}
end end
end end
end. end.