mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 22:54:37 +02:00
+ User login and logoff events
This commit is contained in:
parent
c142a9c3d3
commit
0ae9d0d143
3 changed files with 9 additions and 1 deletions
|
@ -6,6 +6,7 @@ const setClientTheme = require('./theme.js').setClientTheme;
|
|||
const clientConnections = require('./client_connections.js').clientConnections;
|
||||
const StatLog = require('./stat_log.js');
|
||||
const logger = require('./logger.js');
|
||||
const Events = require('./events.js');
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
|
@ -59,6 +60,8 @@ function userLogin(client, username, password, cb) {
|
|||
client.log = logger.log.child( { clientId : client.log.fields.clientId, username : user.username });
|
||||
client.log.info('Successful login');
|
||||
|
||||
Events.emit(Events.getSystemEvents().UserLogin, { user } );
|
||||
|
||||
async.parallel(
|
||||
[
|
||||
function setTheme(callback) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue