2015-04-04 09:19:10 +02:00
|
|
|
local pkg = {}
|
|
|
|
|
2015-04-05 12:50:10 +02:00
|
|
|
function pkg.init()
|
2015-09-12 17:37:29 +02:00
|
|
|
eressea.settings.set("jsreport.enabled", "1")
|
2015-04-05 12:50:10 +02:00
|
|
|
end
|
|
|
|
|
2015-04-04 09:19:10 +02:00
|
|
|
function pkg.update()
|
|
|
|
local factions = { '777', '1wpy', 'd08a', 'hani', 'scaL' }
|
2015-04-05 12:50:10 +02:00
|
|
|
for _, id in ipairs(factions) do
|
2015-04-04 09:19:10 +02:00
|
|
|
local f = faction.get(id)
|
|
|
|
if f then
|
|
|
|
local o = f.options
|
|
|
|
local bit = (math.floor(o / 8) % 2)
|
|
|
|
if bit==0 then
|
2015-05-24 16:21:12 +02:00
|
|
|
eressea.log.info("enable JSON report for " .. tostring(f))
|
2015-04-04 09:19:10 +02:00
|
|
|
f.options = o + 8
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return pkg
|