From: Ari Johnson Date: Mon, 15 Dec 2008 15:53:07 +0000 (+0000) Subject: Don't count IDLE as a command X-Git-Tag: 0.73p1~12 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=07c888ef25b39be6b2afccfb7ed001938a544fc9;p=cobramush.git Don't count IDLE as a command (cherry picked from commit e33ab348d884360d03a39b6a4b94c148edc577b8) --- 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")) {