]> git.pond.sub.org Git - empserver/commit - src/lib/commands/rea.c
Don't lie "You have a new telegram" after read with inform off
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 21 Nov 2011 19:07:48 +0000 (20:07 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 29 Dec 2011 10:47:07 +0000 (11:47 +0100)
commit4d046738fdabf9bc102cb1a42bddb25379184324
tree76baa7186eed2f8594fe3d9e64519f429652e209
parente8f04959506d8064baa8a31cf4d129c8c8101f32
Don't lie "You have a new telegram" after read with inform off

Here's how telegram notification works with NF_INFORM off: typed_wu()
increments the telegram recipient's nat_tgms.  status(), running right
before command prompts, notifies the player when nat_tgms > 0, and
resets it.  Thus, we tell the player how many telegrams arrived since
the previous command prompt.

However, what we really want is something else, namely the number of
"new telegrams waiting".  That's what the notification message says,
after all.  Telegrams already printed by read shouldn't count, even
when they arrived since the previous command prompt.

Make them not count by clearing pending telegrams on read regardless
of toggle inform.

Same for announcements.
src/lib/commands/rea.c