struct CitContext *ContextList = NULL;
int ScheduledShutdown = 0;
+int do_defrag = 0;
+int (*CtdlSendExpressMessageFunc) (char *, char *, char *) = NULL;
/*
* Various things that need to be initialized at startup
lprintf(7, "Opening databases\n");
open_databases();
+ if (do_defrag)
+ defrag_databases();
+
lprintf(7, "Checking floor reference counts\n");
check_ref_counts();
lprintf(5, "citserver[%3d]: %s\n", CC->cs_pid, cmdbuf);
/*
- * Let other clients see the last command we executed, but
- * exclude NOOP because that would be boring.
+ * 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)) {
+ if ( (strncasecmp(cmdbuf, "NOOP", 4))
+ && (strncasecmp(cmdbuf, "PEXP", 4))
+ && (strncasecmp(cmdbuf, "GEXP", 4)) ) {
strcpy(CC->lastcmdname, " ");
strncpy(CC->lastcmdname, cmdbuf, 4);
time(&CC->lastidle);
ERROR);
}
+ /* Run any after-each-command outines registered by modules */
+ PerformSessionHooks(EVT_CMD);
+
} while(strncasecmp(cmdbuf, "QUIT", 4));
cleanup(EXIT_NORMAL);