Add known system events enum - many more to come
This commit is contained in:
parent
74b9d587c9
commit
1482d0b78f
|
@ -10,11 +10,21 @@ const _ = require('lodash');
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
|
|
||||||
|
const SYSTEM_EVENTS = {
|
||||||
|
ClientConnected : 'codes.l33t.enigma.system.connected',
|
||||||
|
ClientDisconnected : 'codes.l33t.enigma.system.disconnected',
|
||||||
|
TermDetected : 'codes.l33t.enigma.term_detected',
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = new class Events extends events.EventEmitter {
|
module.exports = new class Events extends events.EventEmitter {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSystemEvents() {
|
||||||
|
return SYSTEM_EVENTS;
|
||||||
|
}
|
||||||
|
|
||||||
addListener(event, listener) {
|
addListener(event, listener) {
|
||||||
Log.trace( { event : event }, 'Registering event listener');
|
Log.trace( { event : event }, 'Registering event listener');
|
||||||
return super.addListener(event, listener);
|
return super.addListener(event, listener);
|
||||||
|
|
Loading…
Reference in New Issue