diff --git a/exec/lbshell.js b/exec/lbshell.js index b6ae1d7703bbcdbb5c7ad963dbf481cb41997030..76e266be989ce122b5609bd8fa8849e794f2bc16 100644 --- a/exec/lbshell.js +++ b/exec/lbshell.js @@ -704,7 +704,19 @@ while(bbs.online) { continue; } clear_screen(); - bbs.exec_xtrn(xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].number); + if(file_exists("../xtrn/doorscan/doorscan.js")) { + try { + load("../xtrn/doorscan/doorscan.js","run",xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].code); + } + catch(e) { + console.writeln("DOORSCAN ERROR: "+e); + log("Error running "+xtrn_area.sec_list[xsec].prog_list[i].code+" "+e); + } + } + else { + bbs.exec_xtrn(xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].number); + } + draw_main(true); xtrnsec.draw(); }