From 06e84eee94914cffbc1a04271b896f5ab5d59350 Mon Sep 17 00:00:00 2001 From: "Josh M. McKee" Date: Sat, 10 Jun 2017 18:52:11 -0700 Subject: [PATCH] Spaces to tabs, to match upstream convention --- .gitignore | 2 ++ core/bbs.js | 2 +- core/connect.js | 4 ++-- core/events.js | 18 +++++++++--------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index a3349600..0a42d92b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ node_modules/ mods/northern_bloc.hjson mods/suprapi/* mods/suprapi + +.editor-settings diff --git a/core/bbs.js b/core/bbs.js index 39b69767..4fb50c3a 100644 --- a/core/bbs.js +++ b/core/bbs.js @@ -88,7 +88,7 @@ function main() { } ], function complete(err) { - events.registerModules(); + events.registerModules(); // note this is escaped: fs.readFile(paths.join(__dirname, '../misc/startup_banner.asc'), 'utf8', (err, banner) => { diff --git a/core/connect.js b/core/connect.js index 0939906e..85273577 100644 --- a/core/connect.js +++ b/core/connect.js @@ -176,8 +176,8 @@ function connectEntry(client, nextMenu) { // displayBanner(term); - // fire event - events.emit('codes.l33t.enigma.system.term_detected', {'client': client}); + // fire event + events.emit('codes.l33t.enigma.system.term_detected', {'client': client}); setTimeout( () => { return client.menuStack.goto(nextMenu); diff --git a/core/events.js b/core/events.js index 1c3b28b9..73c9739b 100644 --- a/core/events.js +++ b/core/events.js @@ -2,10 +2,10 @@ 'use strict'; const Config = require('./config.js'); -const fs = require('fs'); -const path = require('path'); -const events = require('events'); -const logger = require('./logger.js'); +const fs = require('fs'); +const path = require('path'); +const events = require('events'); +const logger = require('./logger.js'); var eventEmitter = new events.EventEmitter(); @@ -18,10 +18,10 @@ var self = module.exports = { logger.log.debug("Register listener for "+eventName); eventEmitter.on(eventName, listener); }, - remove: function(eventName, listener) { - logger.log.debug("Remove listener for "+eventName); - eventEmitter.removeListener(eventName, listener); - }, + remove: function(eventName, listener) { + logger.log.debug("Remove listener for "+eventName); + eventEmitter.removeListener(eventName, listener); + }, registerModules: function() { var mods = fs.readdirSync(Config.config.paths.mods); @@ -32,7 +32,7 @@ var self = module.exports = { } if (fs.existsSync(modPath)) { var module = require(modPath); - + if (module.registerEvents !== undefined) { logger.log.debug(modPath+" calling registerEvents function"); module.registerEvents();