Reset number of pending telegrams before delete prompt instead of
after.
Before, the client claimed pending telegrams at that prompt, because
it wasn't C_INFORMed of the read, yet. Worse, if more telegrams
arrived while sitting at the prompt, the reset clobbered their number
and sent a bogus clear C_INFORM message, effectively hiding the new
arrivals from the player.
if (res < 0)
pr("\n> Mailbox corrupt, tell the deity.\n");
+ if (*kind != 'a') {
+ if (np->nat_flags & NF_INFORM) {
+ pr_inform(player, "\n");
+ np->nat_tgms = 0;
+ putnat(np);
+ }
+ }
+
if (teles > 0 && player->cnum == num && may_delete) {
pr("\n");
if (teles == 1) {
pr("No %ss for %s at the moment...\n", kind, cname(num));
}
(void)fclose(telfp);
- if (*kind != 'a') {
- if (np->nat_flags & NF_INFORM) {
- pr_inform(player, "\n");
- np->nat_tgms = 0;
- putnat(np);
- }
- }
return RET_OK;
}