configmanager: get(): Make section (core) optional (hurrah)
authorMatthew Wild <mwild1@gmail.com>
Sat, 10 Dec 2011 17:21:19 +0000
changeset 4530 40905e7bf680
parent 4433 f0e72fbe4d6a
child 4541 05f5ec99da77
configmanager: get(): Make section (core) optional (hurrah)
core/configmanager.lua
--- a/core/configmanager.lua	Wed Nov 30 19:37:13 2011 +0000
+++ b/core/configmanager.lua	Sat Dec 10 17:21:19 2011 +0000
@@ -41,6 +41,9 @@
 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];