Commits (1)
  • Rob Swindell's avatar
    Lower level of new "Logoff time <= logon time" log message · 141112e1
    Rob Swindell authored
    ... from ERROR to WARNING, but log the human-readable logon time too.
    This condition can easily happen if the system clock is corrected (e.g. a few seconds via NTP adjustment) during a quick connect/disconnect.
    Don't call logoffstats() unless a user actually successfully logged-in. I don't think sysops actually want all the time bots sit at the logon prompt counted as "time online" in their stats anyway.
......@@ -4239,7 +4239,9 @@ void sbbs_t::logoffstats()
now = time(NULL);
if(now <= logontime) {
lprintf(LOG_ERR, "Logoff time (%lu) <= logon time (%lu)", (ulong)now, (ulong)logontime);
char tmp[128];
lprintf(LOG_WARNING, "Logoff time (%lu) <= logon time (%lu): %s"
,(ulong)now, (ulong)logontime, ctime_r(&logontime, tmp));
ulong minutes_used = (ulong)(now-logontime)/60;
......@@ -4367,6 +4369,7 @@ void node_thread(void* arg)
sbbs->logoffstats(); /* Updates both system and node dsts.ini (daily statistics) files */
SAFEPRINTF(str, "%sclient.ini", sbbs->cfg.node_dir);