From 07c888ef25b39be6b2afccfb7ed001938a544fc9 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Mon, 15 Dec 2008 15:53:07 +0000 Subject: [PATCH] Don't count IDLE as a command (cherry picked from commit e33ab348d884360d03a39b6a4b94c148edc577b8) --- src/bsd.c | 5 +++-- src/prog.c | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bsd.c b/src/bsd.c index e85a4ea..c59e9ba 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -2748,10 +2748,11 @@ do_command(DESC *d, char *command) depth = 0; - (d->cmds)++; - if (!strcmp(command, IDLE_COMMAND)) return 1; + + (d->cmds)++; + if(difftime(mudtime, d->last_time) >= 300) { d->idle_total += difftime(mudtime, d->last_time); d->unidle_times++; diff --git a/src/prog.c b/src/prog.c index 613fdd4..11602c5 100644 --- a/src/prog.c +++ b/src/prog.c @@ -461,10 +461,9 @@ prog_handler(DESC * d, char *input) char *p_buf[NUMQ]; int rcnt, i; - if (!strcmp(input, "IDLE")) { - (d->cmds)++; + if (!strcmp(input, "IDLE")) return 1; - } + /* handle escaped commandz */ if (d->pinfo.lock) { if (!strcmp(input, "|QUIT")) { -- 2.30.2