small fixes

This commit is contained in:
Enno Rehling 2005-04-16 16:44:00 +00:00
parent 1597f54a5e
commit f0e5e62e5b
2 changed files with 12 additions and 7 deletions

View File

@ -26,6 +26,7 @@
/* util includes */
#include <util/base36.h>
#include <util/goodies.h>
#include <util/sql.h>
/* libc includes */
#include <limits.h>
@ -531,9 +532,11 @@ autoseed(newfaction ** players, int nsize)
nextf->lang, nextf->subscription));
f = u->faction;
f->alliance = nextf->allies;
log_printf("New faction (%s), %s at %s\n", itoa36(f->no),
f->email, regionname(r, NULL));
if (f->subscription) {
sql_print(("UPDATE subscriptions SET status='ACTIVE', faction='%s', lastturn=%d, password='%s', info='%s' WHERE id=%u;\n",
factionid(f), f->lastorders, f->override, info, f->subscription));
sql_print(("UPDATE subscriptions SET status='ACTIVE', faction='%s', lastturn=%d, password='%s' WHERE id=%u;\n",
factionid(f), f->lastorders, f->override, f->subscription));
}
/* remove duplicate email addresses */

View File

@ -973,11 +973,13 @@ fix_familiars(void)
/* this is a familiar */
unit * mage = get_familiar_mage(u);
if (mage==0) {
log_error(("%s is a familiar with no mage for faction %s",
unitname(u), factionid(u->faction)));
log_error(("%s is a %s familiar with no mage for faction %s",
unitid(u), racename(0, u, u->race),
factionid(u->faction)));
} else if (!is_mage(mage)) {
log_error(("%s is a familiar , but %s is not a mage for faction %s",
unitname(u), unitname(mage), factionid(u->faction)));
log_error(("%s is a %s familiar, but %s is not a mage for faction %s",
unitid(u), racename(0, u, u->race), unitid(mage),
factionid(u->faction)));
}
}
}