]> git.pond.sub.org Git - empserver/commit
Update and report status even after empty command
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 1 Jul 2011 17:05:16 +0000 (19:05 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 9 Jul 2011 13:12:47 +0000 (15:12 +0200)
commit727e6194c866bb32f0ef991f77de4acad14a3ae9
tree43a943c06c0a624f24ee2597f995c65cf5fd97b4
parent2bbe648d786a11559d265ddc047fb1c8bbeab464
Update and report status even after empty command

When getcommand() reads an empty string, it prints another prompt and
reads another line, without running status().  That's bad:

* nat_timeused is not updated.  Affects the player's prompt, deities'
  nat selector timeused, and commands edit, players, xdump nat.

* Mortal player isn't logged off for game hours, game down, and time
  limit.

* Notifications are delayed: going broke, becoming solvent, new
  telegrams (toggle inform off only), new announcements, capital lost.

Fix by removing the loop.  Callers handle empty input just fine since
4.2.2.

Side effect: empty commands are now recorded in player_commands[].
That's okay.
src/lib/player/empdis.c