mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 20:18:25 +02:00
Major changes around events, event log, etc.
* User event log is now functional & attached to various events * Add additional missing system events * Completely re-write last_callers to have new functionality, etc. * Events.addListenerMultipleEvents() * New 'moduleInitialize' export for module init vs Event specific registerEvents * Add docs on last_callers mod
This commit is contained in:
parent
c1ae3d88ba
commit
52585c78f0
16 changed files with 392 additions and 171 deletions
|
@ -87,7 +87,11 @@ function userLogin(client, username, password, cb) {
|
|||
},
|
||||
function recordLoginHistory(callback) {
|
||||
const LOGIN_HISTORY_MAX = 200; // history of up to last 200 callers
|
||||
return StatLog.appendSystemLogEntry('user_login_history', user.userId, LOGIN_HISTORY_MAX, StatLog.KeepType.Max, callback);
|
||||
const historyItem = JSON.stringify({
|
||||
userId : user.userId,
|
||||
sessionId : user.sessionId,
|
||||
});
|
||||
return StatLog.appendSystemLogEntry('user_login_history', historyItem, LOGIN_HISTORY_MAX, StatLog.KeepType.Max, callback);
|
||||
}
|
||||
],
|
||||
err => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue