From 8e15c890a59da829dff9352dd353e77264a4b5f9 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 13 May 2022 22:31:47 +1000 Subject: [PATCH] Enable ESX X field to have arguments --- load/frame-page.js | 2 +- load/funcs.js | 8 ++++++++ load/msgbases.js | 2 -- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/load/frame-page.js b/load/frame-page.js index d903040..3bff0a7 100644 --- a/load/frame-page.js +++ b/load/frame-page.js @@ -445,7 +445,7 @@ PageFrame.prototype.parse = function(text,context) { advance++; // Find our end ST param in the next DYNAMIC_FIELD_SIZE_MAX chars - matches = text.substr(p+advance,DYNAMIC_FIELD_SIZE_MAX).match(/(([a-zA-Z._^;]+[0-9]?;-?[0-9^;]+)([;]?[^;]+)?)\x1b\\/); + matches = text.substr(p+advance,DYNAMIC_FIELD_SIZE_MAX).match(/(([a-zA-Z._:^;]+[0-9]?;-?[0-9^;]+)([;]?[^;]+)?)\x1b\\/); //log(LOG_DEBUG,'- DF ['+r+'x'+c+'] ADVANCE: '+advance+', MATCHES: '+JSON.stringify(matches)+', LENGTH: '+(matches ? matches[0].length : 0)+', STRING: '+text.substr(p+advance,50)); if (! matches) { diff --git a/load/funcs.js b/load/funcs.js index cb9b161..25809db 100644 --- a/load/funcs.js +++ b/load/funcs.js @@ -111,6 +111,14 @@ function atcode(field,length,pad,context) { pad = pad ? pad : ' '; var result = ''; + var args = []; + + if (field.search(/:/)) { + args = field.split(':'); + field = args.shift(); + } + + //log(LOG_DEBUG,'Field:'+field,'Args:'+JSON.stringify(args)); switch(field) { // Get the ECHOAREA FTN AREA_TAG diff --git a/load/msgbases.js b/load/msgbases.js index 21bfeb4..b10c89c 100644 --- a/load/msgbases.js +++ b/load/msgbases.js @@ -268,8 +268,6 @@ MsgArea.prototype.getUserStats = function() { * @returns {boolean} */ MsgArea.prototype.tag_msgs = function() { - const MAX_PAGE_NUM = 9999; - var msgs = this.list_untagged; // See if we need to something