Avoid repeated hours and game down status notifications
may_play_now() tells deities about hours restriction and game down status. It runs at login and before and after each command. Getting notified that often is annoying. Avoid repetition by remembering notification in new player flags PF_HOURS and PF_DOWN. Add a notification when hours restriction has been lifted. Ensure the notification is printed before the prompt, not before the command, by calling may_play_now() from command() only for mortals. Safe, because may_play_now() always returns true for deities anyway.
This commit is contained in:
parent
b404216dbe
commit
9ff2c62309
4 changed files with 22 additions and 15 deletions
|
@ -369,8 +369,7 @@ extern void log_last_commands(void);
|
|||
extern void update_timeused_login(time_t now);
|
||||
extern void update_timeused(time_t now);
|
||||
extern void enforce_minimum_session_time(void);
|
||||
extern int may_play_now(struct natstr *natp, time_t current_time,
|
||||
int suppress_deity_message);
|
||||
extern int may_play_now(struct natstr *, time_t);
|
||||
/* more under Commands */
|
||||
/* empmod.c */
|
||||
/* init_nats.c */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue