25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01: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 55cfcafd92
commit ce9902da72
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
node (EJAB-705)

View File

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