mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
Updated Events - use glob for finding nested modules/etc.
This commit is contained in:
parent
b7ad850bdc
commit
7343ab2ff2
9 changed files with 96 additions and 67 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
// ENiGMA½
|
||||
const logger = require('./logger.js');
|
||||
const events = require('./events.js');
|
||||
const Events = require('./events.js');
|
||||
|
||||
// deps
|
||||
const _ = require('lodash');
|
||||
|
@ -77,7 +77,7 @@ function addNewClient(client, clientSock) {
|
|||
|
||||
client.log.info(connInfo, 'Client connected');
|
||||
|
||||
events.emit('codes.l33t.enigma.system.connected', {'client': client});
|
||||
Events.emit('codes.l33t.enigma.system.connected', { client : client, connectionCount : clientConnections.length } );
|
||||
|
||||
return id;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ function removeClient(client) {
|
|||
'Client disconnected'
|
||||
);
|
||||
|
||||
events.emit('codes.l33t.enigma.system.disconnected', {'client': client});
|
||||
Events.emit('codes.l33t.enigma.system.disconnected', { client : client, connectionCount : clientConnections.length } );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue