diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 061ed939e..38f0116d6 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -101,19 +101,6 @@ extern int * age; boolean nobattle = false; /* ------------------------------------------------------------- */ -static const char * -dbrace(const struct race * rc) -{ - static char zText[32]; - unsigned char * zPtr = (unsigned char*)zText; - strcpy(zText, LOC(find_locale("en"), rc_name(rc, 0))); - while (*zPtr) { - *zPtr = (unsigned char)toupper(*(int*)zPtr); - ++zPtr; - } - return zText; -} - static void restart(unit *u, const race * rc) { diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 19bc4de6b..43d54c640 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -107,6 +107,19 @@ const char *directions[MAXDIRECTIONS+2] = "pause" }; +const char * +dbrace(const struct race * rc) +{ + static char zText[32]; + unsigned char * zPtr = (unsigned char*)zText; + strcpy(zText, LOC(find_locale("en"), rc_name(rc, 0))); + while (*zPtr) { + *zPtr = (unsigned char)toupper(*(int*)zPtr); + ++zPtr; + } + return zText; +} + const char *gr_prefix[3] = { "einem", "einer", diff --git a/src/common/kernel/eressea.h b/src/common/kernel/eressea.h index 953ffefb3..dc60ee1ce 100644 --- a/src/common/kernel/eressea.h +++ b/src/common/kernel/eressea.h @@ -1206,4 +1206,5 @@ extern FILE * updatelog; extern int produceexp(struct unit * u, skill_t sk, int n); extern boolean sqlpatch; +extern const char * dbrace(const struct race * rc); #endif diff --git a/src/eressea/main.c b/src/eressea/main.c index ed6718c88..dc982446e 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -587,8 +587,8 @@ confirm_newbies(void) while (f) { if (!fval(f, FFL_DBENTRY)) { if (f->subscription) { - fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE id=%u;\n", itoa36(f->no), f->subscription); - fset(f, FFL_DBENTRY); + fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s', race='%s' WHERE id=%u;\n", itoa36(f->no), dbrace(f->race), f->subscription); + fset(f, FFL_DBENTRY); } } f = f->next;