Software /
code /
prosody
Diff
core/configmanager.lua @ 4001:2e8411f6cb14
configmanager: Added rawget().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 05 Jan 2011 06:16:07 +0500 |
parent | 3929:7cb03d67101b |
child | 4358:86be454168fb |
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