Rename connect event to term_detected, add connected and disconnected events
This commit is contained in:
parent
5572ca5d24
commit
c45824b3ad
|
@ -3,6 +3,7 @@
|
|||
|
||||
// ENiGMA½
|
||||
const logger = require('./logger.js');
|
||||
const events = require('./events.js');
|
||||
|
||||
// deps
|
||||
const _ = require('lodash');
|
||||
|
@ -76,6 +77,8 @@ function addNewClient(client, clientSock) {
|
|||
|
||||
client.log.info(connInfo, 'Client connected');
|
||||
|
||||
events.emit('codes.l33t.enigma.system.connected', {'client': client});
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -93,6 +96,8 @@ function removeClient(client) {
|
|||
},
|
||||
'Client disconnected'
|
||||
);
|
||||
|
||||
events.emit('codes.l33t.enigma.system.disconnected', {'client': client});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ function connectEntry(client, nextMenu) {
|
|||
displayBanner(term);
|
||||
|
||||
// fire event
|
||||
events.emit('codes.l33t.enigma.system.connect', {'client': client});
|
||||
events.emit('codes.l33t.enigma.system.term_detected', {'client': client});
|
||||
|
||||
setTimeout( () => {
|
||||
return client.menuStack.goto(nextMenu);
|
||||
|
|
Loading…
Reference in New Issue