(rea): Code cleanup.
This commit is contained in:
parent
1a8488bc45
commit
cc1a92e512
1 changed files with 5 additions and 9 deletions
|
@ -79,7 +79,7 @@ rea(void)
|
||||||
int readit;
|
int readit;
|
||||||
|
|
||||||
memset(kind, 0, sizeof(kind));
|
memset(kind, 0, sizeof(kind));
|
||||||
(void)time(&now);
|
now = time(NULL);
|
||||||
|
|
||||||
if (*player->argp[0] == 'w') {
|
if (*player->argp[0] == 'w') {
|
||||||
sprintf(kind, "announcement");
|
sprintf(kind, "announcement");
|
||||||
|
@ -147,12 +147,9 @@ rea(void)
|
||||||
lasttype = tgm.tel_type;
|
lasttype = tgm.tel_type;
|
||||||
pr("%s ", telnames[(int)tgm.tel_type]);
|
pr("%s ", telnames[(int)tgm.tel_type]);
|
||||||
if ((tgm.tel_type == TEL_NORM) ||
|
if ((tgm.tel_type == TEL_NORM) ||
|
||||||
(tgm.tel_type == TEL_ANNOUNCE)) {
|
(tgm.tel_type == TEL_ANNOUNCE) ||
|
||||||
|
(tgm.tel_type == TEL_BULLETIN))
|
||||||
pr("from %s, (#%d)", cname(tgm.tel_from), tgm.tel_from);
|
pr("from %s, (#%d)", cname(tgm.tel_from), tgm.tel_from);
|
||||||
}
|
|
||||||
if (tgm.tel_type == TEL_BULLETIN) {
|
|
||||||
pr("from %s, (#%d)", cname(tgm.tel_from), tgm.tel_from);
|
|
||||||
}
|
|
||||||
pr(" dated %s", ctime(&tgm.tel_date));
|
pr(" dated %s", ctime(&tgm.tel_date));
|
||||||
lastdate = tgm.tel_date;
|
lastdate = tgm.tel_date;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +191,7 @@ rea(void)
|
||||||
(void)fflush(telfp);
|
(void)fflush(telfp);
|
||||||
(void)fseek(telfp, (long)size, SEEK_SET);
|
(void)fseek(telfp, (long)size, SEEK_SET);
|
||||||
size = filelen;
|
size = filelen;
|
||||||
(void)time(&now);
|
now = time(NULL);
|
||||||
goto more;
|
goto more;
|
||||||
}
|
}
|
||||||
if (*kind == 'a') {
|
if (*kind == 'a') {
|
||||||
|
@ -208,12 +205,11 @@ rea(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (teles <= 0) {
|
if (teles <= 0)
|
||||||
if (player->cnum == num)
|
if (player->cnum == num)
|
||||||
pr("No %ss for you at the moment...\n", kind);
|
pr("No %ss for you at the moment...\n", kind);
|
||||||
else
|
else
|
||||||
pr("No %ss for %s at the moment...\n", kind, cname(num));
|
pr("No %ss for %s at the moment...\n", kind, cname(num));
|
||||||
}
|
|
||||||
(void)fclose(telfp);
|
(void)fclose(telfp);
|
||||||
if (np->nat_flags & NF_INFORM) {
|
if (np->nat_flags & NF_INFORM) {
|
||||||
pr_inform(player, "\n");
|
pr_inform(player, "\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue