mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-09 15:06:54 +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:
parent
55cfcafd92
commit
ce9902da72
@ -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)
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user