diff options
Diffstat (limited to 'src/gen_mod.erl')
-rw-r--r-- | src/gen_mod.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gen_mod.erl b/src/gen_mod.erl index eed3e4405..163a8b5dc 100644 --- a/src/gen_mod.erl +++ b/src/gen_mod.erl @@ -3,18 +3,17 @@ %%% Author : Alexey Shchepin <alexey@sevcom.net> %%% Purpose : %%% Created : 24 Jan 2003 by Alexey Shchepin <alexey@sevcom.net> -%%% Id : $Id$ %%%---------------------------------------------------------------------- -module(gen_mod). -author('alexey@sevcom.net'). --vsn('$Revision$ '). -export([start/0, start_module/3, stop_module/2, get_opt/2, get_opt/3, + get_opt_host/3, get_module_opt/4, loaded_modules/1, loaded_modules_with_opts/1, @@ -133,6 +132,10 @@ get_module_opt(Host, Module, Opt, Default) -> get_opt(Opt, Opts, Default) end. +get_opt_host(Host, Opts, Default) -> + Val = get_opt(host, Opts, Default), + element(2, regexp:gsub(Val, "@HOST@", Host)). + loaded_modules(Host) -> ets:select(ejabberd_modules, [{#ejabberd_module{_ = '_', module_host = {'$1', Host}}, |