From a713113df3683f62740f545c72aa0ac56395f879 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 1 Jun 2020 22:43:19 +1000 Subject: [PATCH] Fix for calling defined methods --- load/defs.js | 5 ----- main.js | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/load/defs.js b/load/defs.js index df54c8a..a660f2a 100644 --- a/load/defs.js +++ b/load/defs.js @@ -75,11 +75,6 @@ function Frame() { this.frame_fields = []; // If a response frame, the embedded fields in the frame - // The RAW frame content - this.raw=function() { - return base64_decode(this.content).replace(/(\r\n|\n|\r)/gm,''); - }; - // Render the frame to the user this.render=function(withHeader) { owner = base64_decode(this.owner); diff --git a/main.js b/main.js index 552a8dd..8222ca9 100644 --- a/main.js +++ b/main.js @@ -584,15 +584,15 @@ while(bbs.online) { // External Frame // @todo returning from the frame, go to the 0 key if it is set case FRAME_TYPE_EXTERNAL: - log(LOG_DEBUG,'- ACTION_GOTO: EXTERNAL ['+JSON.stringify(fo.raw())+']'); + log(LOG_DEBUG,'- ACTION_GOTO: EXTERNAL ['+JSON.stringify(fo.content)+']'); - switch(fo.raw()) { + switch(fo.content.replace(/\n/,'')) { case 'bbs.user_config()': case 'bbs.read_mail(MAIL_YOUR)': case 'bbs.scan_subs(SCAN_NEW)': case 'bbs.scan_posts()': case 'bbs.post_msg()': - eval(fo.raw()); + eval(fo.content); // Check and see if our shell was changed if (user.command_shell != 'ansitex') { @@ -603,7 +603,7 @@ while(bbs.online) { break; default: - console.putmsg(JSON.stringify(fo.raw())); + console.putmsg(JSON.stringify(fo.content)); sendBaseline(ERR_ROUTE,false); action = false; break;