- do {
- time(&CC->lastcmd);
- memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
- if (client_gets(cmdbuf) < 1) cleanup(EXIT_NULL);
- lprintf(5, "citserver[%3d]: %s\n", CC->cs_pid, cmdbuf);
-
- /*
- * Let other clients see the last command we executed, and
- * update the idle time, but not NOOP, PEXP, or GEXP.
- */
- if ( (strncasecmp(cmdbuf, "NOOP", 4))
- && (strncasecmp(cmdbuf, "PEXP", 4))
- && (strncasecmp(cmdbuf, "GEXP", 4)) ) {
- strcpy(CC->lastcmdname, " ");
- safestrncpy(CC->lastcmdname, cmdbuf,
- sizeof(CC->lastcmdname) );
- time(&CC->lastidle);
- }
-
- if ((strncasecmp(cmdbuf, "ENT0", 4)) && (strncasecmp(cmdbuf, "MESG", 4)) && (strncasecmp(cmdbuf, "MSGS", 4)))
- {
- CC->cs_flags &= ~CS_POSTING;
- }
-