25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

* src/gen_mod.erl: Added get_module_opt_host/3 (thanks to Badlop)

SVN Revision: 927
This commit is contained in:
Alexey Shchepin 2007-09-11 11:20:36 +00:00
parent b5465a3f90
commit e809c6c322
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2007-09-11 Alexey Shchepin <alexey@process-one.net>
* src/gen_mod.erl: Added get_module_opt_host/3 (thanks to Badlop)
2007-09-10 Mickael Remond <mremond@process-one.net>
* src/guide.tex: Fix: user_regexp acls are valid for all local

View File

@ -15,6 +15,7 @@
get_opt/3,
get_opt_host/3,
get_module_opt/4,
get_module_opt_host/3,
loaded_modules/1,
loaded_modules_with_opts/1,
get_hosts/2,
@ -132,6 +133,10 @@ get_module_opt(Host, Module, Opt, Default) ->
get_opt(Opt, Opts, Default)
end.
get_module_opt_host(Host, Module, Default) ->
Val = get_module_opt(Host, Module, host, Default),
element(2, regexp:gsub(Val, "@HOST@", Host)).
get_opt_host(Host, Opts, Default) ->
Val = get_opt(host, Opts, Default),
element(2, regexp:gsub(Val, "@HOST@", Host)).