bugfix passwort für newbies

This commit is contained in:
Enno Rehling 2002-04-20 12:41:49 +00:00
parent 04d5ce1966
commit 4cbab2ffa6
4 changed files with 6 additions and 4 deletions

View File

@ -1868,7 +1868,7 @@ 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))));
"value", gc_add(strdup(f->passw))));
}
RENDER(f, buf, sizeof(buf), ("newbie_password", "password", f->passw));
rnl(F);

View File

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

View File

@ -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;
}