aboutsummaryrefslogtreecommitdiffstats
path: root/core/configmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-12-10 17:21:19 +0000
committerMatthew Wild <mwild1@gmail.com>2011-12-10 17:21:19 +0000
commit76628c7453e56d5e156214c142ca05f9908c0191 (patch)
treef66aa3f37b83c771b56de6cf9833a8edc7152af8 /core/configmanager.lua
parentc08e057bd2cf4822f73defb5ea581c7c77cd8e8a (diff)
downloadprosody-76628c7453e56d5e156214c142ca05f9908c0191.tar.gz
prosody-76628c7453e56d5e156214c142ca05f9908c0191.zip
configmanager: get(): Make section (core) optional (hurrah)
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r--core/configmanager.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua
index 85919492..e2253171 100644
--- a/core/configmanager.lua
+++ b/core/configmanager.lua
@@ -41,6 +41,9 @@ function getconfig()
end
function get(host, section, key)
+ if not key then
+ section, key = "core", section;
+ end
local sec = config[host][section];
if sec then
return sec[key];