Diff

core/configmanager.lua @ 5380:e119e378b1d9

configmanager: Fix so unset variables are searched for in the global section
author Kim Alvefur <zash@zash.se>
date Sat, 23 Mar 2013 04:14:52 +0100
parent 5357:ac530c44772e
child 5413:0bf5e90be086
line wrap: on
line diff
--- a/core/configmanager.lua	Sat Mar 23 02:38:30 2013 +0100
+++ b/core/configmanager.lua	Sat Mar 23 04:14:52 2013 +0100
@@ -25,7 +25,7 @@
 local config = setmetatable({ ["*"] = { } }, config_mt);
 
 -- When host not found, use global
-local host_mt = { };
+local host_mt = { __index = function(_, k) return config["*"][k] end }
 
 function getconfig()
 	return config;