From eb081514471383e1c932f7981954b3dc297aa313 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 11 Jan 2004 11:55:48 +0000 Subject: [PATCH] writepasswd um ausgabe der subscription-id erweitert. --- src/common/gamecode/laws.c | 22 ++++++++++++++++++++++ src/eressea/main.c | 20 -------------------- src/eressea/server.cpp | 22 ---------------------- 3 files changed, 22 insertions(+), 42 deletions(-) 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()