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

@ -2069,7 +2069,7 @@ set_passw(void)
} }
set_string(&u->faction->passw, pbuf); set_string(&u->faction->passw, pbuf);
fset(u->faction, FFL_OVERRIDE); 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)))); "value", gc_add(strdup(u->faction->passw))));
} }
break; break;

View File

@ -1867,8 +1867,8 @@ report(FILE *F, faction * f, const faction_list * addresses,
if (f->age <= 2) { if (f->age <= 2) {
if (f->age <= 1) { if (f->age <= 1) {
ADDMSG(&f->msgs, msg_message("changepasswd", 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)); RENDER(f, buf, sizeof(buf), ("newbie_password", "password", f->passw));
rnl(F); rnl(F);

View File

@ -2128,11 +2128,13 @@ readfaction(FILE * F)
} }
f->lastorders = ri(F); f->lastorders = ri(F);
f->age = ri(F); f->age = ri(F);
/*
if (sqlstream && f->age==0) { if (sqlstream && f->age==0) {
fprintf(sqlstream, fprintf(sqlstream,
"UPDATE users SET status='ACTIVE' where email='%s';\n", "UPDATE users SET status='ACTIVE' where email='%s';\n",
f->email); f->email);
} }
*/
if (global.data_version < NEWRACE_VERSION) { if (global.data_version < NEWRACE_VERSION) {
race_t rc = (char) ri(F); race_t rc = (char) ri(F);
f->race = new_race[rc]; f->race = new_race[rc];

View File

@ -565,7 +565,7 @@ confirm_newbies(void)
const faction * f = factions; const faction * f = factions;
while (f) { while (f) {
if (f->age==0) { 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; f = f->next;
} }