From 8e2b71582994f8ec558606fb914238bd11b330d7 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 28 Mar 2020 00:55:42 +1100 Subject: [PATCH] Optimised Frame::parse() --- ctrl/videotex.ini | 14 +++- load/defs.js | 41 +++++++--- main.js | 15 +++- mods/logon.js | 201 ---------------------------------------------- 4 files changed, 56 insertions(+), 215 deletions(-) delete mode 100644 mods/logon.js diff --git a/ctrl/videotex.ini b/ctrl/videotex.ini index 0da7dab..9cb3e75 100644 --- a/ctrl/videotex.ini +++ b/ctrl/videotex.ini @@ -1,4 +1,16 @@ ; Videotex Options ; Our key used to sign frames we send to other systems -; gpg_key=516@videotex +gpg_key=516@videotex + +[prefix] +key=0@videotex + +[prefix:5161] +key=5161@videotex + +[prefix:51] +key=51@videotex + +[prefix:516] +key=516@videotex diff --git a/load/defs.js b/load/defs.js index 244eaa9..24fc800 100644 --- a/load/defs.js +++ b/load/defs.js @@ -44,6 +44,7 @@ function Frame() { this.key=[ null,null,null,null,null,null,null,null,null,null ]; // Initialise frame array + /* this.frame_data = {}; this.frame_content = {}; for(x=0;x1) - break; - continue; - } - bbs.menu(fname); - highest_printed_logon_screen = i; - } - - // Print logon screens based on security level - if(user.security.level > highest_printed_logon_screen - && bbs.menu_exists("logon" + user.security.level)) - bbs.menu("logon" + user.security.level); - - // Print one of text/menu/random*.*, picked at random - // e.g. random1.asc, random2.asc, random3.asc, etc. - var random_list = directory(system.text_dir + "menu/random*.*"); - if(random_list.length) - bbs.menu(file_getname(random_list[random(random_list.length)]).slice(0,-4)); - - console.clear(LIGHTGRAY); - bbs.user_event(EVENT_LOGON); -} - -if(user.security.level==99 /* Sysop logging on */ - && !system.matchuser("guest") /* Guest account does not yet exist */ - && bbs.mods.userprops.get("logon", "makeguest", true) /* Sysop has not asked to stop this question */ - ) { - if(console.yesno("Create Guest/Anonymous user account (highly recommended)")) - load("makeguest.js"); - else if(!console.yesno("Ask again later")) - bbs.mods.userprops.set("logon", "makeguest", false); - console.crlf(); -} - -// Last few callers -console.aborted=false; -console.clear(LIGHTGRAY); -bbs.exec("?logonlist -l"); -if(bbs.node_status != NODE_QUIET && ((system.settings&SYS_SYSSTAT) || !user.is_sysop)) - bbs.mods.logonlist_lib.add(); - -// Auto-message -auto_msg=system.data_dir + "msgs/auto.msg" -if(file_size(auto_msg)>0) { - console.printfile(auto_msg,P_NOATCODES|P_WORDWRAP); -} -console.crlf(); - -if(options.show_avatar && console.term_supports(USER_ANSI)) { - if(options.draw_avatar_above || options.draw_avatar_right) - bbs.mods.avatar_lib.draw(user.number, /* name: */null, /* netaddr: */null, options.draw_avatar_above, options.draw_avatar_right); - else - bbs.mods.avatar_lib.show(user.number); - console.attributes = 7; // Clear the background attribute -} - -// Set rlogin_xtrn_menu=true in [logon] section of ctrl/modopts.ini -// if you want your RLogin server to act as a door game server only -if(options.rlogin_xtrn_menu - && bbs.sys_status&SS_RLOGIN) { - bbs.xtrn_sec(); - bbs.hangup(); -} else if(!(user.security.restrictions&UFLAG_G) - && console.term_supports(USER_ANSI) - && options.set_avatar == true) { - var avatar = bbs.mods.avatar_lib.read(user.number); - if(!avatar || (!avatar.data && !avatar.disabled)) { - alert("You have not selected an avatar."); - if(console.yesno("Select avatar now")) - load("avatar_chooser.js"); - } -}