mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Show and throw error when captcha_cmd is required but not configured.
SVN Revision: 2875
This commit is contained in:
parent
75ca3d8975
commit
a658348ac1
@ -329,7 +329,9 @@ get_prog_name() ->
|
||||
FileName when is_list(FileName) ->
|
||||
FileName;
|
||||
_ ->
|
||||
""
|
||||
?CRITICAL_MSG("The option captcha_cmd is not configured, but some "
|
||||
"module wants to use the CAPTCHA feature.", []),
|
||||
throw({error, option_not_configured_captcha_cmd})
|
||||
end.
|
||||
|
||||
get_url(Str) ->
|
||||
@ -389,9 +391,10 @@ return(Port, TRef, Result) ->
|
||||
Result.
|
||||
|
||||
is_feature_enabled() ->
|
||||
case get_prog_name() of
|
||||
"" -> false;
|
||||
try get_prog_name() of
|
||||
Prog when is_list(Prog) -> true
|
||||
catch
|
||||
_:_ -> false
|
||||
end.
|
||||
|
||||
is_feature_available() ->
|
||||
|
Loading…
Reference in New Issue
Block a user