mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
* Add rumorz mod
* ANSI/pipe working properly in VerticalMenuView * Fix bug in renderStringLength() * Make initSequence() part of prototype chain for inheritance * Use proper 'desc' field vs 'status' for menus when setting client/user status * Move pipeToAnsi() to setItems/setFocusItems vs every render * Add %RR random rumor MCI * Predefined MCI's can be init @ startup - RR uses random as a test bed * Add some StatLog functionality for ordering, keep forever, etc. * Fix TextView redraw issue * Better VerticalMenuView drawItem() logic * Add 'key press' emit for View * Enable formats for BBS list - works with MCI * Remove old system_property.js
This commit is contained in:
parent
2b68201f7d
commit
30ba609fb4
13 changed files with 492 additions and 241 deletions
|
@ -16,6 +16,24 @@ const _ = require('lodash');
|
|||
const moment = require('moment');
|
||||
|
||||
exports.getPredefinedMCIValue = getPredefinedMCIValue;
|
||||
exports.init = init;
|
||||
|
||||
function init(cb) {
|
||||
setNextRandomRumor(cb);
|
||||
}
|
||||
|
||||
function setNextRandomRumor(cb) {
|
||||
StatLog.getSystemLogEntries('system_rumorz', StatLog.Order.Random, 1, (err, entry) => {
|
||||
if(entry) {
|
||||
entry = entry[0];
|
||||
}
|
||||
const randRumor = entry && entry.log_value ? entry.log_value : '';
|
||||
StatLog.setNonPeristentSystemStat('random_rumor', randRumor);
|
||||
if(cb) {
|
||||
return cb(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getPredefinedMCIValue(client, code) {
|
||||
|
||||
|
@ -138,6 +156,13 @@ function getPredefinedMCIValue(client, code) {
|
|||
|
||||
TC : function totalCalls() { return StatLog.getSystemStat('login_count').toString(); },
|
||||
|
||||
RR : function randomRumor() {
|
||||
// start the process of picking another random one
|
||||
setNextRandomRumor();
|
||||
|
||||
return StatLog.getSystemStat('random_rumor');
|
||||
},
|
||||
|
||||
//
|
||||
// Special handling for XY
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue