Move control functions to control/ dir

This commit is contained in:
Deon George 2023-12-24 17:46:37 +11:00
parent b90a058d47
commit 29f82592ac
4 changed files with 4 additions and 4 deletions

View File

@ -934,7 +934,7 @@ while (bbs.online) {
break; break;
} }
require('ansitex/load/control-frameedit.js','CONTROL_FRAMEEDIT'); require('ansitex/load/control/frameedit.js','CONTROL_FRAMEEDIT');
// If we are editing a specific frame, attempt to load it // If we are editing a specific frame, attempt to load it
if (next_page) { if (next_page) {
@ -1237,18 +1237,18 @@ while (bbs.online) {
// If this is the register page // If this is the register page
if (so.page.name === new PageObject(FRAME_REGISTER)) { if (so.page.name === new PageObject(FRAME_REGISTER)) {
log(LOG_DEBUG,'Adding REGISTER to control stack'); log(LOG_DEBUG,'Adding REGISTER to control stack');
require('ansitex/load/control-'+so.page.key[1]+'.js','CONTROL_REGISTER'); require('ansitex/load/control/'+so.page.key[1]+'.js','CONTROL_REGISTER');
control.push(eval('new '+so.page.key[1]+'();')); control.push(eval('new '+so.page.key[1]+'();'));
} else if (so.page.name === new PageObject(FRAME_SQRL)) { } else if (so.page.name === new PageObject(FRAME_SQRL)) {
log(LOG_DEBUG,'Adding SQRL to control stack'); log(LOG_DEBUG,'Adding SQRL to control stack');
require('ansitex/load/control-'+so.page.key[1]+'.js','CONTROL_SQRL'); require('ansitex/load/control/'+so.page.key[1]+'.js','CONTROL_SQRL');
control.push(eval('new '+so.page.key[1]+'();')); control.push(eval('new '+so.page.key[1]+'();'));
inkey_timeout = 1000; inkey_timeout = 1000;
} else if (so.page.key[1] && (so.page.type === FRAME_TYPE_RESPONSE) && (typeof(so.page.key[1]) !== 'number')) { } else if (so.page.key[1] && (so.page.type === FRAME_TYPE_RESPONSE) && (typeof(so.page.key[1]) !== 'number')) {
log(LOG_DEBUG,'Adding METHOD to control stack: '+so.page.key[1]); log(LOG_DEBUG,'Adding METHOD to control stack: '+so.page.key[1]);
require('ansitex/load/control-'+so.page.key[1]+'.js','CONTROL_'+so.page.key[1].toUpperCase()); require('ansitex/load/control/'+so.page.key[1]+'.js','CONTROL_'+so.page.key[1].toUpperCase());
control.push(eval('new '+so.page.key[1]+'();')); control.push(eval('new '+so.page.key[1]+'();'));
} }