From 15cf37c55ca68aea0b2a1647362e3dee4ffb813c Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 25 Nov 2015 18:03:47 -0700 Subject: [PATCH] Add Who's Online mod --- core/client_connections.js | 2 +- core/predefined_mci.js | 2 +- mods/last_callers.js | 5 +---- mods/menu.hjson | 10 ++++++++++ mods/themes/luciano_blocktronics/MMENU.ANS | Bin 3350 -> 3368 bytes mods/themes/luciano_blocktronics/WHOSON.ANS | Bin 0 -> 1187 bytes mods/themes/luciano_blocktronics/theme.hjson | 9 +++++++++ 7 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 mods/themes/luciano_blocktronics/WHOSON.ANS diff --git a/core/client_connections.js b/core/client_connections.js index e07a5644..6a2504cc 100644 --- a/core/client_connections.js +++ b/core/client_connections.js @@ -11,7 +11,7 @@ var clientConnections = []; exports.clientConnections = clientConnections; function getActiveConnections() { - return clientConnections.length; + return clientConnections; } function addNewClient(client, clientSock) { diff --git a/core/predefined_mci.js b/core/predefined_mci.js index 8ff760d8..9ac291c0 100644 --- a/core/predefined_mci.js +++ b/core/predefined_mci.js @@ -105,7 +105,7 @@ function getPredefinedMCIValue(client, code) { // :TODO: cpu load average (over N seconds): http://stackoverflow.com/questions/9565912/convert-the-output-of-os-cpus-in-node-js-to-percentage // :TODO: Node version/info - AN : function activeNodes() { return clientConnections.getActiveConnections().toString(); }, + AN : function activeNodes() { return clientConnections.getActiveConnections().length.toString(); }, TC : function totalCalls() { return sysProp.getSystemProperty('login_count').toString(); }, diff --git a/mods/last_callers.js b/mods/last_callers.js index 71d5036e..2899a69c 100644 --- a/mods/last_callers.js +++ b/mods/last_callers.js @@ -5,7 +5,6 @@ var MenuModule = require('../core/menu_module.js').MenuModule; var userDb = require('../core/database.js').dbs.user; var ViewController = require('../core/view_controller.js').ViewController; var getSystemLoginHistory = require('../core/stats.js').getSystemLoginHistory; -var colorCodes = require('../core/color_codes.js'); var moment = require('moment'); var async = require('async'); @@ -89,8 +88,6 @@ LastCallersModule.prototype.mciReady = function(mciData, cb) { }); }, function populateList(callback) { - var callersView = vc.getView(MciCodeIds.CallerList); - var listFormat = self.menuConfig.config.listFormat || '{userName} - {location} - {affils} - {ts}'; var dateTimeFormat = self.menuConfig.config.dateTimeFormat || 'ddd MMM DD'; @@ -118,4 +115,4 @@ LastCallersModule.prototype.mciReady = function(mciData, cb) { cb(err); } ); -} \ No newline at end of file +}; diff --git a/mods/menu.hjson b/mods/menu.hjson index 3f855c95..715c43f7 100644 --- a/mods/menu.hjson +++ b/mods/menu.hjson @@ -484,6 +484,10 @@ value: { command: "L" } action: @menu:mainMenuLastCallers } + { + value: { command: "W" } + action: @menu:mainMenuWhosOnline + } { value: { command: "Y" } action: @menu:mainMenuUserStats @@ -512,6 +516,12 @@ art: LASTCALL options: { pause: true } } + mainMenuWhosOnline: { + desc: Who's Online + module: whos_online + art: WHOSON + options: { pause: true } + } mainMenuUserStats: { desc: User Stats art: STATUS diff --git a/mods/themes/luciano_blocktronics/MMENU.ANS b/mods/themes/luciano_blocktronics/MMENU.ANS index e059c34662b39956363f0068fca2d2bb00c75ef6..f0e97e2d5651e4fee476e5b823108bee072a311f 100644 GIT binary patch delta 40 scmbOxwL)sc4Q^3WXX$8Tvs~$DLt_xjJXZk-Hs9tJWn^4F`6G`i0QOW1)c^nh delta 22 ecmZ1>HBD;64Q^&5Bj?R;xkVWnr%q<(RRsW9)dtT1 diff --git a/mods/themes/luciano_blocktronics/WHOSON.ANS b/mods/themes/luciano_blocktronics/WHOSON.ANS new file mode 100644 index 0000000000000000000000000000000000000000..3b083edf6aa9c6960019991ef4595a12d10fde0e GIT binary patch literal 1187 zcmb_bO-md>5M3dsg*|yn=F$kkYxnHzOk_@Gktp~Dq8{cXMsdM*4-xWXr%C^l;Codw zwGjzk?1kO#s(SC$*A|^`E8otWSakDxnfjs&ZPmn-imvi8&89`?>02z-)6RX&cq1gI zjBrHtV^rBl6hab@a}It)f&--Oyo4PlD2OC@2CESA>7#%~1|u&2A$BhJknX|H6d;UjM~YB?K&-6TT=nJuG#NVUfRIo|Rc%Efs8 z4qc>N9j_11b}!u7>G9F&f#|c}oFc+>W4v`q*klakYiwQ_Q-BQT1IW|*=bbX?`}f0| z7nwTA2^}dl!rk28uO5F5&LF(;=Jt8De$x0*5fGnO@y@Bub^*E&=aLGs1j_zyazZ(E z{Caf~hKlOi4$0C2!DScRkP*yviCX=nL^U3Flob99U MC+_OUzP{}H1u%@hzyJUM literal 0 HcmV?d00001 diff --git a/mods/themes/luciano_blocktronics/theme.hjson b/mods/themes/luciano_blocktronics/theme.hjson index d55a7ea1..f0b2352e 100644 --- a/mods/themes/luciano_blocktronics/theme.hjson +++ b/mods/themes/luciano_blocktronics/theme.hjson @@ -133,6 +133,15 @@ } } + mainMenuWhosOnline: { + config: { + listFormat: "|00|01|36{node:<6.6}{userName:<17.17}{affils:<19.19}{action:<20.20}{timeOn:<8}" + } + mci: { + VM1: { height: 10 } + } + } + messageAreaMessageList: { config: { listFormat: "|00|01|37{msgNum:>4} |00|37- |36{subj:<29.29} {from:<20.20} {ts} |01|31{newIndicator}"