aboutsummaryrefslogtreecommitdiff
path: root/src/gen_mod.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gen_mod.erl')
-rw-r--r--src/gen_mod.erl11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gen_mod.erl b/src/gen_mod.erl
index 878ac41ec..b003986a8 100644
--- a/src/gen_mod.erl
+++ b/src/gen_mod.erl
@@ -56,7 +56,6 @@
{ram_db_type, 2},
{ram_db_type, 3}]).
--include("ejabberd.hrl").
-include("logger.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
@@ -127,7 +126,7 @@ stop_child(Proc) ->
%% Start all the modules in all the hosts
start_modules() ->
- Hosts = ?MYHOSTS,
+ Hosts = ejabberd_config:get_myhosts(),
?INFO_MSG("Loading modules for ~s", [format_hosts_list(Hosts)]),
lists:foreach(fun start_modules/1, Hosts).
@@ -327,7 +326,7 @@ stop_modules() ->
lists:foreach(
fun(Host) ->
stop_modules(Host)
- end, ?MYHOSTS).
+ end, ejabberd_config:get_myhosts()).
-spec stop_modules(binary()) -> ok.
@@ -418,7 +417,7 @@ get_module_opt(Host, Module, Opt) ->
get_module_opt(Host, Module, Opt, F) when is_function(F) ->
get_module_opt(Host, Module, Opt, undefined);
get_module_opt(global, Module, Opt, Default) ->
- Hosts = (?MYHOSTS),
+ Hosts = ejabberd_config:get_myhosts(),
[Value | Values] = lists:map(fun (Host) ->
get_module_opt(Host, Module, Opt,
Default)
@@ -867,7 +866,7 @@ get_hosts(Opts, Prefix) ->
undefined ->
case get_opt(host, Opts) of
undefined ->
- [<<Prefix/binary, Host/binary>> || Host <- ?MYHOSTS];
+ [<<Prefix/binary, Host/binary>> || Host <- ejabberd_config:get_myhosts()];
Host ->
[Host]
end;
@@ -902,7 +901,7 @@ config_reloaded() ->
lists:foreach(
fun(Host) ->
reload_modules(Host)
- end, ?MYHOSTS).
+ end, ejabberd_config:get_myhosts()).
-spec is_equal_opt(atom(), opts(), opts()) ->
true | {false, any(), any()}.