configure dbname in eressea.ini (or don't use DB if not

This commit is contained in:
Enno Rehling 2017-01-22 13:09:32 +01:00
parent f86d86d4c6
commit abeb7e344e
1 changed files with 11 additions and 9 deletions

View File

@ -26,15 +26,17 @@ function callbacks(rules, name, ...)
end end
local function dbupdate() local function dbupdate()
update_scores() update_scores()
dbname = config.dbname or 'eressea.db' if config.dbname then
edb = db.open(config.basepath..'/'..dbname) dbname = config.basepath..'/'..config.dbname
if edb~=nil then edb = db.open(dbame)
edb:update_factions() if edb~=nil then
edb:update_scores() edb:update_factions()
else edb:update_scores()
eressea.log.error("could not open "..config.basepath..'/'..dbname) else
end eressea.log.error("could not open "..dbname)
end
end
end end
local function write_emails(locales) local function write_emails(locales)