configmanager: Fix so unset variables are searched for in the global section
authorKim Alvefur <zash@zash.se>
Sat, 23 Mar 2013 03:14:52 +0000 (04:14 +0100)
committerKim Alvefur <zash@zash.se>
Sat, 23 Mar 2013 03:14:52 +0000 (04:14 +0100)
core/configmanager.lua

index a0a1f81708184c62b1b6d5def6d8dd5a9026c301..e31dbd7233e7f1274ea8f842cb2256e55843c2ff 100644 (file)
@@ -25,7 +25,7 @@ local config_mt = { __index = function (t, k) return rawget(t, "*"); end};
 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;