enable json reports for develop branch

This commit is contained in:
Enno Rehling 2015-04-05 12:50:10 +02:00
parent 82926318c0
commit 4fb0c133e8
1 changed files with 8 additions and 2 deletions

View File

@ -1,14 +1,20 @@
local pkg = {} local pkg = {}
print("loading jsreport module")
function pkg.init()
eressea.settings.set("feature.jsreport.enable", "1")
end
function pkg.update() function pkg.update()
local factions = { '777', '1wpy', 'd08a', 'hani', 'scaL' } local factions = { '777', '1wpy', 'd08a', 'hani', 'scaL' }
for id in ipairs(factions) do for _, id in ipairs(factions) do
local f = faction.get(id) local f = faction.get(id)
if f then if f then
local o = f.options local o = f.options
local bit = (math.floor(o / 8) % 2) local bit = (math.floor(o / 8) % 2)
if bit==0 then if bit==0 then
eressea.log.debug("enable JSON report for " .. tostring(f)) eressea.log.warning("enable JSON report for " .. tostring(f))
f.options = o + 8 f.options = o + 8
end end
end end