server/scripts/eressea/xmlconf.lua
Enno Rehling e9992db51c fix pool test (GiveRestriction broke it).
- do not default to loading the E2 rules for tests, so GiveRestriction
will not be set to a default value.
- only load configuration if a ruleset has been defined.
2015-05-24 09:09:34 +02:00

9 lines
413 B
Lua

local confdir = 'conf/'
if config.install then
confdir = config.install .. '/' .. confdir
end
if config.rules then
local rules = config.rules .. '/'
assert(0 == read_xml(confdir .. rules .. 'config.xml', confdir .. rules .. 'catalog.xml'), "could not load XML data, did you compile with LIBXML2 ?")
assert(0 == eressea.config.read(rules .. 'config.json', confdir), "could not read JSON data")
end