Minor cleanup, prevent XY from warning in log
This commit is contained in:
parent
03ee20783b
commit
0519d9a001
|
@ -1,17 +1,18 @@
|
||||||
/* jslint node: true */
|
/* jslint node: true */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var Config = require('./config.js').config;
|
// ENiGMA½
|
||||||
var Log = require('./logger.js').log;
|
const Config = require('./config.js').config;
|
||||||
var getMessageAreaByTag = require('./message_area.js').getMessageAreaByTag;
|
const Log = require('./logger.js').log;
|
||||||
var clientConnections = require('./client_connections.js');
|
const getMessageAreaByTag = require('./message_area.js').getMessageAreaByTag;
|
||||||
var sysProp = require('./system_property.js');
|
const clientConnections = require('./client_connections.js');
|
||||||
|
const sysProp = require('./system_property.js');
|
||||||
|
|
||||||
var packageJson = require('../package.json');
|
// deps
|
||||||
var assert = require('assert');
|
const packageJson = require('../package.json');
|
||||||
var os = require('os');
|
const os = require('os');
|
||||||
var _ = require('lodash');
|
const _ = require('lodash');
|
||||||
var moment = require('moment');
|
const moment = require('moment');
|
||||||
|
|
||||||
exports.getPredefinedMCIValue = getPredefinedMCIValue;
|
exports.getPredefinedMCIValue = getPredefinedMCIValue;
|
||||||
|
|
||||||
|
@ -68,10 +69,10 @@ function getPredefinedMCIValue(client, code) {
|
||||||
return area ? area.name : '';
|
return area ? area.name : '';
|
||||||
},
|
},
|
||||||
|
|
||||||
ML : function messageAreaDescription() {
|
ML : function messageAreaDescription() {
|
||||||
const area = getMessageAreaByTag(client.user.properties.message_area_tag);
|
const area = getMessageAreaByTag(client.user.properties.message_area_tag);
|
||||||
return area ? area.desc : '';
|
return area ? area.desc : '';
|
||||||
},
|
},
|
||||||
|
|
||||||
SH : function termHeight() { return client.term.termHeight.toString(); },
|
SH : function termHeight() { return client.term.termHeight.toString(); },
|
||||||
SW : function termWidth() { return client.term.termWidth.toString(); },
|
SW : function termWidth() { return client.term.termWidth.toString(); },
|
||||||
|
@ -113,6 +114,11 @@ function getPredefinedMCIValue(client, code) {
|
||||||
AN : function activeNodes() { return clientConnections.getActiveConnections().length.toString(); },
|
AN : function activeNodes() { return clientConnections.getActiveConnections().length.toString(); },
|
||||||
|
|
||||||
TC : function totalCalls() { return sysProp.getSystemProperty('login_count').toString(); },
|
TC : function totalCalls() { return sysProp.getSystemProperty('login_count').toString(); },
|
||||||
|
|
||||||
|
//
|
||||||
|
// Special handling for XY
|
||||||
|
//
|
||||||
|
XY : function xyHack() { return; /* nothing */ },
|
||||||
|
|
||||||
}[code](); // :TODO: Just call toString() here and remove above - DRY
|
}[code](); // :TODO: Just call toString() here and remove above - DRY
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue