From 0577ad33997fdc6a3cbfc86be9394a7341d28a25 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 24 Mar 2002 12:31:38 +0000 Subject: [PATCH] =?UTF-8?q?SQL-Dateien=20enthalten=20Aktivierung=20f=C3=BC?= =?UTF-8?q?r=20neu=20ausgesetzte=20Parteien?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/gamecode/laws.c | 6 +++--- src/common/kernel/save.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index b39997fdd..046e5be5d 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -1200,12 +1200,12 @@ quit(void) f->nunits, f->number, f->money); fprintf(sqlstream, "UPDATE subscriptions SET lastturn=%d, password='%s', info='%s' " - "WHERE game=%d AND faction='%s';", + "WHERE game=%d AND faction='%s';\n", f->lastorders, f->override, info, GAME_ID, itoa36(f->no)); } else { fprintf(sqlstream, - "UPDATE subscriptions SET lastturn=%d, password='%s' " - "WHERE game=%d AND faction='%s';", + "UPDATE subscriptions SET status='ACTIVE', lastturn=%d, password='%s' " + "WHERE game=%d AND faction='%s';\n", f->lastorders, f->override, GAME_ID, itoa36(f->no)); } diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index a1e5dbbbb..c390a8329 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -2177,6 +2177,11 @@ readfaction(FILE * F) } f->lastorders = ri(F); f->age = ri(F); + if (sqlstream && f->age==0) { + fprintf(sqlstream, + "UPDATE users SET status='ACTIVE' where email='%s';\n", + f->email); + } if (global.data_version < NEWRACE_VERSION) { race_t rc = (char) ri(F); f->race = new_race[rc];