Software /
code /
prosody
Comparison
core/configmanager.lua @ 1615:0e3eacf135f2
configmanager: Default options appearing before Host "*" to global (fixes potential traceback)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 28 Jul 2009 18:02:11 +0100 |
parent | 1523:841d61be198f |
child | 1777:de86734d3f7f |
comparison
equal
deleted
inserted
replaced
1614:951ed38ad64f | 1615:0e3eacf135f2 |
---|---|
111 end, | 111 end, |
112 __newindex = function (t, k, v) | 112 __newindex = function (t, k, v) |
113 set(env.__currenthost or "*", "core", k, v); | 113 set(env.__currenthost or "*", "core", k, v); |
114 end}); | 114 end}); |
115 | 115 |
116 rawset(env, "__currenthost", "*") -- Default is global | |
116 function env.Host(name) | 117 function env.Host(name) |
117 rawset(env, "__currenthost", name); | 118 rawset(env, "__currenthost", name); |
118 -- Needs at least one setting to logically exist :) | 119 -- Needs at least one setting to logically exist :) |
119 set(name or "*", "core", "defined", true); | 120 set(name or "*", "core", "defined", true); |
120 end | 121 end |