diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-05-09 08:36:30 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-05-09 08:36:30 +0300 |
commit | 068db1a2d98c338b408f84b5a294ae7400256e13 (patch) | |
tree | 55da1db14d3dfa6ec6b1ff56e774165da3f14f76 /src/ejabberd_config.erl | |
parent | mod_client_state: Delete only the configured hooks (diff) |
Handle Redis connection in a separate module
Diffstat (limited to 'src/ejabberd_config.erl')
-rw-r--r-- | src/ejabberd_config.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ejabberd_config.erl b/src/ejabberd_config.erl index 06de61b5..16eebc0e 100644 --- a/src/ejabberd_config.erl +++ b/src/ejabberd_config.erl @@ -30,7 +30,7 @@ add_global_option/2, add_local_option/2, get_global_option/2, get_local_option/2, get_global_option/3, get_local_option/3, - get_option/2, get_option/3, add_option/2, + get_option/2, get_option/3, add_option/2, has_option/1, get_vh_by_auth_method/1, is_file_readable/1, get_version/0, get_myhosts/0, get_mylang/0, prepare_opt_val/4, convert_table_to_binary/5, @@ -838,6 +838,10 @@ get_option(Opt, F, Default) -> end end. +-spec has_option(atom() | {atom(), global | binary()}) -> any(). +has_option(Opt) -> + get_option(Opt, fun(_) -> true end, false). + init_module_db_table(Modules) -> catch ets:new(module_db, [named_table, public, bag]), %% Dirty hack for mod_pubsub |