From e8f04959506d8064baa8a31cf4d129c8c8101f32 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 21 Nov 2011 20:05:45 +0100 Subject: [PATCH] Fix telegram notifications during read (toggle inform on) 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. --- src/lib/commands/rea.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib/commands/rea.c b/src/lib/commands/rea.c index 962abd8f7..22df74e6b 100644 --- a/src/lib/commands/rea.c +++ b/src/lib/commands/rea.c @@ -132,6 +132,14 @@ rea(void) 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) { @@ -174,13 +182,6 @@ rea(void) 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; } -- 2.43.0