DAtenbank-Link, neues Parteiflag

This commit is contained in:
Enno Rehling 2002-10-28 06:41:16 +00:00
parent bed5203254
commit 52ee8642de
2 changed files with 10 additions and 3 deletions

View File

@ -905,6 +905,7 @@ extern int max_unique_id;
#define FFL_RESTART (1<<2) #define FFL_RESTART (1<<2)
#define FFL_OVERRIDE (1<<27) /* Override-Passwort wurde benutzt */ #define FFL_OVERRIDE (1<<27) /* Override-Passwort wurde benutzt */
#define FFL_DBENTRY (1<<28) /* Partei ist in Datenbank eingetragen */
#define UFL_WERE (1<<28) #define UFL_WERE (1<<28)
/* Flags, die gespeichert werden sollen: */ /* Flags, die gespeichert werden sollen: */

View File

@ -381,6 +381,10 @@ game_done(void)
#include "magic.h" #include "magic.h"
#if (defined(_MSC_VER))
# define MALLOCDBG 1
#endif
#if MALLOCDBG #if MALLOCDBG
static void static void
init_malloc_debug(void) init_malloc_debug(void)
@ -578,10 +582,12 @@ typedef struct lostdata {
void void
confirm_newbies(void) confirm_newbies(void)
{ {
const faction * f = factions; faction * f = factions;
if (sqlstream==NULL) return;
while (f) { while (f) {
if (f->age==0) { if (!fval(f, FFL_DBENTRY)) {
fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE game=%d AND password='%s';\n", itoa36(f->no), GAME_ID, f->passw); fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE game=%d AND password='%s';\n", itoa36(f->no), GAME_ID, f->passw);
fset(f, FFL_DBENTRY);
} }
f = f->next; f = f->next;
} }