Improve message and style of loading/unloading console logs, use ES6 template literals

This commit is contained in:
Jérémie Astori 2016-12-11 03:29:09 -05:00
parent b01517861d
commit bc01d6ccd1
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
"use strict";
var _ = require("lodash");
var colors = require("colors/safe");
var pkg = require("../package.json");
var Chan = require("./models/chan");
var crypto = require("crypto");
@ -89,7 +90,7 @@ function Client(manager, name, config) {
});
if (client.name) {
log.info("User '" + client.name + "' loaded");
log.info(`User ${colors.bold(client.name)} loaded`);
}
}

View File

@ -1,6 +1,7 @@
"use strict";
var _ = require("lodash");
var colors = require("colors/safe");
var fs = require("fs");
var Client = require("./client");
var Helper = require("./helper");
@ -42,7 +43,7 @@ ClientManager.prototype.autoloadUsers = function() {
if (client) {
client.quit();
this.clients = _.without(this.clients, client);
log.info("User '" + name + "' disconnected");
log.info(`User ${colors.bold(name)} disconnected and removed`);
}
});
}, 1000, {maxWait: 10000}));