diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 988f4b59e..8b41f3b7f 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -2069,7 +2069,7 @@ set_passw(void) } set_string(&u->faction->passw, pbuf); fset(u->faction, FFL_OVERRIDE); - ADDMSG(&u->faction->msgs, msg_message("changepasswd", + ADDMSG(&u->faction->msgs, msg_message("changepasswd", "value", gc_add(strdup(u->faction->passw)))); } break; diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index b7eaba386..6c98fb9e1 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -1867,8 +1867,8 @@ report(FILE *F, faction * f, const faction_list * addresses, if (f->age <= 2) { if (f->age <= 1) { - ADDMSG(&f->msgs, msg_message("changepasswd", - "value", gc_add(strdup(buf)))); + ADDMSG(&f->msgs, msg_message("changepasswd", + "value", gc_add(strdup(f->passw)))); } RENDER(f, buf, sizeof(buf), ("newbie_password", "password", f->passw)); rnl(F); diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index 3b014244c..4b70a336e 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -2128,11 +2128,13 @@ 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]; diff --git a/src/eressea/main.c b/src/eressea/main.c index bf71bd67b..4f3a18a19 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -565,7 +565,7 @@ confirm_newbies(void) const faction * f = factions; while (f) { if (f->age==0) { - fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE game=%d;\n", itoa36(f->no), GAME_ID); + fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE game=%d AND password='%s';\n", itoa36(f->no), GAME_ID, f->passw); } f = f->next; }