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];