Software /
code /
prosody
Changeset
4001:2e8411f6cb14
configmanager: Added rawget().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 05 Jan 2011 06:16:07 +0500 |
parents | 4000:ca91d6e1d802 |
children | 4002:95ccbd5e280f |
files | core/configmanager.lua |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/configmanager.lua Tue Jan 04 21:38:14 2011 +0000 +++ b/core/configmanager.lua Wed Jan 05 06:16:07 2011 +0500 @@ -47,6 +47,15 @@ end return nil; end +function _M.rawget(host, section, key) + local hostconfig = rawget(config, host); + if hostconfig then + local sectionconfig = rawget(hostconfig, section); + if sectionconfig then + return rawget(sectionconfig, key); + end + end +end local function set(config, host, section, key, value) if host and section and key then