From 0a1b0498a652973e85c27342b4e96546d60349c6 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Sun, 24 Oct 2010 15:45:42 +1000 Subject: [PATCH] * Rename option captcha to captcha_protected for consistency. * Document captcha_protected option --- doc/guide.tex | 2 ++ src/mod_register.erl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/guide.tex b/doc/guide.tex index 71e019c05..69cd268f6 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -3775,6 +3775,8 @@ Options: doesn't allow to register new accounts from s2s or existing c2s sessions. You can change it by defining access rule in this option. Use with care: allowing registration from s2s leads to uncontrolled massive accounts creation by rogue users. +\titem{\{captcha\_protected, false|true\}} \ind{options!captcha\_protected} +Protect registrations with CAPTCHA (see section \ref{captcha}). The default is \term{false}. \titem{\{welcome\_message, Message\}} \ind{options!welcomem}Set a welcome message that is sent to each newly registered account. The first string is the subject, and the second string is the message body. diff --git a/src/mod_register.erl b/src/mod_register.erl index e8d572d6b..ea53bd82a 100644 --- a/src/mod_register.erl +++ b/src/mod_register.erl @@ -94,7 +94,7 @@ process_iq(From, To, #iq{type = Type, lang = Lang, sub_el = SubEl, id = ID} = IQ, Source) -> IsCaptchaEnabled = case gen_mod:get_module_opt( - To#jid.lserver, ?MODULE, captcha, false) of + To#jid.lserver, ?MODULE, captcha_protected, false) of true -> true; _ ->