forked from github/server
bugfix passwort für newbies
This commit is contained in:
parent
04d5ce1966
commit
4cbab2ffa6
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue