use the email address from eressea.ini in CR mailto

This commit is contained in:
Enno Rehling 2017-01-22 04:46:36 +01:00
parent a6dd02c111
commit 39375e8d4a
4 changed files with 5 additions and 14 deletions

View File

@ -53,10 +53,6 @@
<xi:include href="config://default/names-ghouls.xml"/>
<xi:include href="config://default/names-dragons.xml"/>
<strings>
<string name="mailto">
<text locale="de">eressea-server@eressea.kn-bremen.de</text>
<text locale="en">eressea-server@eressea.kn-bremen.de</text>
</string>
<string name="newbie_info_game">
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff
ERESSEA 2 BEFEHLE an eressea-server@eressea.kn-bremen.de zu senden.</text>

View File

@ -45,10 +45,6 @@
<function name="wage" value="minimum_wage"/>
</rules>
<strings>
<string name="mailto">
<text locale="de">eressea-server@eressea.kn-bremen.de</text>
<text locale="en">eressea-server@eressea.kn-bremen.de</text>
</string>
<string name="newbie_info_game">
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff
ERESSEA 3 BEFEHLE an eressea-server@eressea.kn-bremen.de zu senden.</text>

View File

@ -46,10 +46,6 @@
<function name="wage" value="minimum_wage"/>
</rules>
<strings>
<string name="mailto">
<text locale="de">eressea-server@eressea.kn-bremen.de</text>
<text locale="en">eressea-server@eressea.kn-bremen.de</text>
</string>
<string name="newbie_info_game">
<text locale="de">Bitte denke daran, deine Befehle mit dem Betreff
ERESSEA 4 BEFEHLE an eressea-server@eressea.kn-bremen.de zu senden.</text>

View File

@ -1475,7 +1475,7 @@ report_computer(const char *filename, report_context * ctx, const char *bom)
faction *f = ctx->f;
const char *prefix;
region *r;
const char *mailto = LOC(f->locale, "mailto");
const char *mailto = config_get("game.email");
const attrib *a;
FILE *F = fopen(filename, "w");
static const race *rc_human;
@ -1510,8 +1510,11 @@ report_computer(const char *filename, report_context * ctx, const char *bom)
fprintf(F, "%d;Zeitalter\n", era);
fprintf(F, "\"%s\";Build\n", eressea_version());
if (mailto != NULL) {
// char mailcmd[64];
// snprintf(mailcmd, sizeof(mailcmd), "%s %d, %s", game_name(), game_id(), LOC(f->locale, "mailcmd"));
const char * mailcmd = LOC(f->locale, "mailcmd");
fprintf(F, "\"%s\";mailto\n", mailto);
fprintf(F, "\"%s\";mailcmd\n", LOC(f->locale, "mailcmd"));
fprintf(F, "\"%s\";mailcmd\n", mailcmd);
}
show_alliances_cr(F, f);