diff options
author | Waqas Hussain <waqas20@gmail.com> | 2011-01-05 06:16:07 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2011-01-05 06:16:07 +0500 |
commit | 54c06fbaeb823ab1e6460c1943968ecdc6414b85 (patch) | |
tree | 4cacf95d7bfc4a4cb5140a84ced0b211f6d73791 /core/configmanager.lua | |
parent | 71960dbef32583ee4e65cedc57faac5a11638d6a (diff) | |
download | prosody-54c06fbaeb823ab1e6460c1943968ecdc6414b85.tar.gz prosody-54c06fbaeb823ab1e6460c1943968ecdc6414b85.zip |
configmanager: Added rawget().
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r-- | core/configmanager.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua index b703bb8c..4cc3ef46 100644 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@ -47,6 +47,15 @@ function get(host, section, key) 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 |