write_emails auch für wdw

This commit is contained in:
Christian Schlittchen 2005-11-27 13:40:09 +00:00
parent 383dc8ad15
commit 0c5efc7a61
3 changed files with 23 additions and 20 deletions

View file

@ -25,6 +25,7 @@ function run_scripts()
scripts = {
"spells.lua",
"extensions.lua",
"write_emails.lua",
"eressea/eternath.lua",
"eressea/wedding-jadee.lua",
"eressea/ponnuki.lua"
@ -34,26 +35,6 @@ function run_scripts()
end
end
function write_emails()
local locales = { "de", "en" }
local files = {}
local key
for key in locales do
local locale = locales[key]
files[locale] = io.open(basepath .. "/emails." .. locale, "w")
end
local faction
for faction in factions() do
-- print(faction.id .. " - " .. faction.locale)
files[faction.locale]:write(faction.email .. "\n")
end
for key in files do
files[key]:close()
end
end
function process(orders)
-- initialize starting equipment for new players
equipment_setitem("new_faction", "conquesttoken", "1");

View file

@ -54,6 +54,7 @@ print("- Running wdw-run.lua")
scripts = {
"spells.lua",
"extensions.lua",
"write_emails.lua",
"wdw/sphinx.lua",
"wdw/standings.lua"
}

View file

@ -0,0 +1,21 @@
function write_emails()
local locales = { "de", "en" }
local files = {}
local key
for key in locales do
local locale = locales[key]
files[locale] = io.open(basepath .. "/emails." .. locale, "w")
end
local faction
for faction in factions() do
-- print(faction.id .. " - " .. faction.locale)
files[faction.locale]:write(faction.email .. "\n")
end
for key in files do
files[key]:close()
end
end