projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4bd1266
)
configmanager: Added rawget().
author
Waqas Hussain
<waqas20@gmail.com>
Wed, 5 Jan 2011 01:16:07 +0000
(06:16 +0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Wed, 5 Jan 2011 01:16:07 +0000
(06:16 +0500)
core/configmanager.lua
patch
|
blob
|
history
diff --git
a/core/configmanager.lua
b/core/configmanager.lua
index b703bb8c6b92d8540ed20b32894db5638b0a9fe3..4cc3ef467f963b360d6dbb573a3641ded702b744 100644
(file)
--- 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