that's better.

This commit is contained in:
Enno Rehling 2002-11-02 17:24:41 +00:00
parent a24d62f570
commit 4d8dd88db3
4 changed files with 16 additions and 15 deletions

View File

@ -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)
{

View File

@ -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",

View File

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

View File

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