forked from github/server
factionid and curseid are also boring.
This commit is contained in:
parent
434cf8fce6
commit
303eb86399
|
@ -47,8 +47,6 @@ struct param;
|
|||
|
||||
#define buildingid(x) itoa36((x)->no)
|
||||
#define shipid(x) itoa36((x)->no)
|
||||
#define factionid(x) itoa36((x)->no)
|
||||
#define curseid(x) itoa36((x)->no)
|
||||
|
||||
const char * game_name(void);
|
||||
int game_id(void);
|
||||
|
|
|
@ -273,11 +273,11 @@ faction *addfaction(const char *email, const char *password,
|
|||
addlist(&factions, f);
|
||||
fhash(f);
|
||||
|
||||
slprintf(buf, sizeof(buf), "%s %s", LOC(loc, "factiondefault"), factionid(f));
|
||||
slprintf(buf, sizeof(buf), "%s %s", LOC(loc, "factiondefault"), itoa36(f->no));
|
||||
f->name = _strdup(buf);
|
||||
|
||||
if (!f->race) {
|
||||
log_warning("creating a faction that has no race", factionid(f));
|
||||
log_warning("creating a faction that has no race", itoa36(f->no));
|
||||
}
|
||||
|
||||
return f;
|
||||
|
@ -828,7 +828,7 @@ int writepasswd(void)
|
|||
|
||||
for (f = factions; f; f = f->next) {
|
||||
fprintf(F, "%s:%s:%s:%u\n",
|
||||
factionid(f), f->email, f->_password, f->subscription);
|
||||
itoa36(f->no), f->email, f->_password, f->subscription);
|
||||
}
|
||||
fclose(F);
|
||||
return 0;
|
||||
|
|
|
@ -1291,7 +1291,7 @@ faction *read_faction(struct gamedata * data)
|
|||
};
|
||||
f->banner = _strdup(name);
|
||||
|
||||
log_debug(" - Lese Partei %s (%s)", f->name, factionid(f));
|
||||
log_debug(" - Lese Partei %s (%s)", f->name, itoa36(f->no));
|
||||
|
||||
READ_STR(data->store, name, sizeof(name));
|
||||
if (set_email(&f->email, name) != 0) {
|
||||
|
|
|
@ -997,7 +997,7 @@ int quit_cmd(unit * u, struct order *ord)
|
|||
char buffer[64];
|
||||
write_order(ord, buffer, sizeof(buffer));
|
||||
cmistake(u, ord, 86, MSG_EVENT);
|
||||
log_warning("QUIT with illegal password for faction %s: %s\n", factionid(f), buffer);
|
||||
log_warning("QUIT with illegal password for faction %s: %s\n", itoa36(f->no), buffer);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ void score(void)
|
|||
fprintf(scoreFP, "%30.30s (%3.3s) %5s (%3d)\n",
|
||||
f->name,
|
||||
f->race->_name,
|
||||
factionid(f),
|
||||
itoa36(f->no),
|
||||
f->age);
|
||||
}
|
||||
fclose(scoreFP);
|
||||
|
|
|
@ -1406,7 +1406,7 @@ report_template(const char *filename, report_context * ctx, const char *charset)
|
|||
newline(out);
|
||||
newline(out);
|
||||
|
||||
sprintf(buf, "%s %s \"password\"", LOC(f->locale, "ERESSEA"), factionid(f));
|
||||
sprintf(buf, "%s %s \"password\"", LOC(f->locale, "ERESSEA"), itoa36(f->no));
|
||||
rps_nowrap(out, buf);
|
||||
newline(out);
|
||||
newline(out);
|
||||
|
|
|
@ -140,7 +140,7 @@ static char *groupid(const struct group *g, const struct faction *f)
|
|||
static name idbuf[8];
|
||||
static int nextbuf = 0;
|
||||
char *buf = idbuf[(++nextbuf) % 8];
|
||||
sprintf(buf, "%s (%s)", g->name, factionid(f));
|
||||
sprintf(buf, "%s (%s)", g->name, itoa36(f->no));
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
@ -1418,7 +1418,7 @@ int write_reports(faction * f, time_t ltime)
|
|||
do {
|
||||
char filename[32];
|
||||
char path[MAX_PATH];
|
||||
sprintf(filename, "%d-%s.%s", turn, factionid(f),
|
||||
sprintf(filename, "%d-%s.%s", turn, itoa36(f->no),
|
||||
rtype->extension);
|
||||
join_path(reportpath(), filename, path, sizeof(path));
|
||||
errno = 0;
|
||||
|
@ -1441,7 +1441,7 @@ int write_reports(faction * f, time_t ltime)
|
|||
}
|
||||
}
|
||||
if (!gotit) {
|
||||
log_warning("No report for faction %s!", factionid(f));
|
||||
log_warning("No report for faction %s!", itoa36(f->no));
|
||||
}
|
||||
finish_reports(&ctx);
|
||||
return 0;
|
||||
|
@ -1452,7 +1452,7 @@ static void write_script(FILE * F, const faction * f)
|
|||
report_type *rtype;
|
||||
char buf[1024];
|
||||
|
||||
fprintf(F, "faction=%s:email=%s:lang=%s", factionid(f), f->email,
|
||||
fprintf(F, "faction=%s:email=%s:lang=%s", itoa36(f->no), f->email,
|
||||
locale_name(f->locale));
|
||||
if (f->options & (1 << O_BZIP2))
|
||||
fputs(":compression=bz2", F);
|
||||
|
|
|
@ -96,12 +96,12 @@ int update_nmrs(void)
|
|||
int nmr = turn - f->lastorders + 1;
|
||||
if (timeout>0) {
|
||||
if (nmr < 0 || nmr > timeout) {
|
||||
log_error("faction %s has %d NMR", factionid(f), nmr);
|
||||
log_error("faction %s has %d NMR", itoa36(f->no), nmr);
|
||||
nmr = _max(0, nmr);
|
||||
nmr = _min(nmr, timeout);
|
||||
}
|
||||
if (nmr > 0) {
|
||||
log_debug("faction %s has %d NMR", factionid(f), nmr);
|
||||
log_debug("faction %s has %d NMR", itoa36(f->no), nmr);
|
||||
}
|
||||
++nmrs[nmr];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue