mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
* System stats
* Last callers rewritten using format and VM * Some minor MCI stuff
This commit is contained in:
parent
d02d9e4a7c
commit
1c1f4394ca
15 changed files with 126 additions and 39 deletions
|
@ -5,6 +5,7 @@ var theme = require('./theme.js');
|
|||
var clientConnections = require('./client_connections.js').clientConnections;
|
||||
var ansi = require('./ansi_term.js');
|
||||
var userDb = require('./database.js').dbs.user;
|
||||
var sysProp = require('./system_property.js');
|
||||
|
||||
var async = require('async');
|
||||
var _ = require('lodash');
|
||||
|
@ -89,6 +90,11 @@ function login(callingMenu, formData, extraArgs) {
|
|||
callback(null); // always non-fatal
|
||||
});
|
||||
},
|
||||
function updateSystemLoginCount(callback) {
|
||||
var sysLoginCount = sysProp.getSystemProperty('login_count') || 0;
|
||||
sysLoginCount = parseInt(sysLoginCount, 10) + 1;
|
||||
sysProp.persistSystemProperty('login_count', sysLoginCount, callback);
|
||||
},
|
||||
function recordLastLogin(callback) {
|
||||
user.persistProperty('last_login_timestamp', now.toISOString(), function persisted(err) {
|
||||
callback(err);
|
||||
|
@ -106,7 +112,6 @@ function login(callingMenu, formData, extraArgs) {
|
|||
});
|
||||
},
|
||||
function recordLoginHistory(callback) {
|
||||
|
||||
userDb.serialize(function serialized() {
|
||||
userDb.run(
|
||||
'INSERT INTO user_login_history (user_id, user_name, timestamp) ' +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue