aboutsummaryrefslogtreecommitdiffstats
path: root/core/configmanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2011-01-05 06:16:07 +0500
committerWaqas Hussain <waqas20@gmail.com>2011-01-05 06:16:07 +0500
commitb4faeea3ecf8004997da797453f1318daecf171f (patch)
tree1d5f62f1ddc5d21609cc5d599267c35ebf00f2fe /core/configmanager.lua
parent7745bdd7d6ca7871cb2fd3017500843c1d0b49ac (diff)
downloadprosody-b4faeea3ecf8004997da797453f1318daecf171f.tar.gz
prosody-b4faeea3ecf8004997da797453f1318daecf171f.zip
configmanager: Added rawget().
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r--core/configmanager.lua9
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