natp->nat_tgms = 0;
}
- while (status()) {
- command();
+ while (status() && command()) {
player->aborted = player->eof;
empth_yield();
}
{
char *redir; /* UTF-8 */
char scanspace[1024];
+ time_t now;
+ struct natstr *natp;
if (getcommand(player->combuf) < 0)
return 0;
+
+ now = time(NULL);
+ update_timeused(now);
+ natp = getnatp(player->cnum);
+ if (natp->nat_stat == STAT_ACTIVE &&
+ natp->nat_timeused > m_m_p_d * 60) {
+ pr("Max minutes per day limit exceeded.\n");
+ return 0;
+ }
+
if (parse(player->combuf, scanspace, player->argp, player->comtail,
&player->condarg, &redir) < 0) {
pr("See \"info Syntax\"?\n");
return lp;
}
diff --git a/src/lib/player/player.c b/src/lib/player/player.c
-index 0e1c5e3..9773db4 100644
+index 9912ba1..9dd8c5b 100644
--- a/src/lib/player/player.c
+++ b/src/lib/player/player.c
@@ -40,6 +40,7 @@
update_timeused_login(player->curup);
show_motd();
if (init_nats() < 0) {
-@@ -116,7 +117,7 @@ player_main(struct player *p)
+@@ -115,7 +116,7 @@ player_main(struct player *p)
}
/* #*# I put the following line in to prevent server crash -KHS */
natp = getnatp(player->cnum);
putnat(natp);
update_timeused(natp->nat_last_logout);
enforce_minimum_session_time();
-@@ -175,7 +176,7 @@ status(void)
+@@ -134,7 +135,7 @@ command(void)
+ if (getcommand(player->combuf) < 0)
+ return 0;
+
+- now = time(NULL);
++ now = empire_time(NULL);
+ update_timeused(now);
+ natp = getnatp(player->cnum);
+ if (natp->nat_stat == STAT_ACTIVE &&
+@@ -186,7 +187,7 @@ status(void)
if (!(old_nstat & MONEY) && (player->nstat & MONEY))
pr("You are no longer broke!\n");