diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index dd154dcf0..40f82ca1a 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -3703,3 +3703,25 @@ count_migrants (const faction * f) #endif return f->num_migrants; } + +int +writepasswd(void) +{ + FILE * F; + char zText[128]; + + sprintf(zText, "%s/passwd", basepath()); + F = cfopen(zText, "w"); + if (F) { + faction *f; + puts("Schreibe Passwörter..."); + + for (f = factions; f; f = f->next) { + fprintf(F, "%s:%s:%s:%s:%u\n", + factionid(f), f->email, f->passw, f->override, f->subscription); + } + fclose(F); + return 0; + } + return 1; +} diff --git a/src/eressea/main.c b/src/eressea/main.c index 57c4a616b..0b7325b13 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -248,26 +248,6 @@ writefactiondata(void) } #endif -static void -writepasswd(void) -{ - FILE * F; - char zText[128]; - - sprintf(zText, "%s/passwd", basepath()); - F = cfopen(zText, "w"); - if (F) { - faction *f; - puts("Schreibe Passwörter..."); - - for (f = factions; f; f = f->next) { - fprintf(F, "%s:%s:%s:%s\n", - factionid(f), f->email, f->passw, f->override); - } - fclose(F); - } -} - #ifdef SHORTPWDS static void readshortpwds() diff --git a/src/eressea/server.cpp b/src/eressea/server.cpp index 7cef76273..4a79225d7 100644 --- a/src/eressea/server.cpp +++ b/src/eressea/server.cpp @@ -262,28 +262,6 @@ writefactiondata(void) } #endif -int -writepasswd(void) -{ - FILE * F; - char zText[128]; - - sprintf(zText, "%s/passwd", basepath()); - F = cfopen(zText, "w"); - if (F) { - faction *f; - puts("Schreibe Passwörter..."); - - for (f = factions; f; f = f->next) { - fprintf(F, "%s:%s:%s:%s\n", - factionid(f), f->email, f->passw, f->override); - } - fclose(F); - return 0; - } - return 1; -} - #ifdef SHORTPWDS static void readshortpwds()