Fix enable delete on login

This commit is contained in:
Deon George 2020-07-05 22:02:06 +10:00
parent a713113df3
commit 6139db24d3
2 changed files with 13 additions and 11 deletions

View File

@ -260,11 +260,11 @@ Frame.prototype.parse = function(text) {
f = 39; f = 39;
b = 49; b = 49;
// Forground Color // Forground Color
} else if (csi[num] >= 30 && csi[num] <= 39) { } else if (csi[num] >= 30 && csi[num] <= 39) {
f = csi[num]; f = csi[num];
// Background Color // Background Color
} else if (csi[num] >= 40 && csi[num] <= 49) { } else if (csi[num] >= 40 && csi[num] <= 49) {
b = num; b = num;
} }
@ -352,6 +352,7 @@ Frame.prototype.parse = function(text) {
this.frame_fields.push({ this.frame_fields.push({
ftype: fieldtype, ftype: fieldtype,
flength: fieldlen, flength: fieldlen,
fchar: fieldchar,
r: r, r: r,
c: c, c: c,
attribute: {i:i,f:f,b:b}, attribute: {i:i,f:f,b:b},

19
main.js
View File

@ -43,7 +43,7 @@ while(bbs.online) {
if (action == false) { if (action == false) {
read = console.inkey(K_NONE,inkey_timeout); read = console.inkey(K_NONE,inkey_timeout);
} }
log(LOG_DEBUG,'READ: ['+read+']'); log(LOG_DEBUG,'READ: ['+read+'] ('+read.charCodeAt(0)+')');
inkey_timeout = 60000; // Set our key timeout to 60s inkey_timeout = 60000; // Set our key timeout to 60s
system.node_list[bbs.node_num-1].action=0xff; // to ensure our node status is updated correctly system.node_list[bbs.node_num-1].action=0xff; // to ensure our node status is updated correctly
@ -230,7 +230,7 @@ while(bbs.online) {
// End of field entry. // End of field entry.
case '#': case '#':
case '\r': case '\r':
log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+'] A'); log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+']');
// Next Field // Next Field
fn++; fn++;
@ -250,20 +250,21 @@ while(bbs.online) {
break; break;
case '*': case '*':
log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+'] B'); log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+']');
//$current['prevmode'] = MODE_FIELD; //$current['prevmode'] = MODE_FIELD;
action = ACTION_STAR; action = ACTION_STAR;
break; break;
case KEY_DEL: // Delete Key pressed
log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+'] C'); case CTRL_H:
/* log(LOG_DEBUG,'- MODE_FIELD:FRAME_TYPE_RESPONSE: ['+read+']'+' cf:'+(cf ? cf.fvalue.length : '{}')+' ct:'+cf.ftype);
if ($this->fo->setFieldCurrentInputDelete())
$client->send(LEFT.$this->fo::$if_filler.LEFT);
*/ if (cf.fvalue.length > 0) {
cf.fvalue = cf.fvalue.substring(0,cf.fvalue.length-1);
console.write(KEY_ESC+'[D'+cf.fchar+KEY_ESC+'[D');
}
break; break;