Skip to content
Snippets Groups Projects
Commit bb5b9d86 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

New module: msgscancfg.js to replace copy/pasta msg config menu in *.src

Also added 2 new menu options:
R - re-load msg scan config & pointers
W - save msg scan config & pointers

Leaving the menu file named "maincfg.msg" even though that's a pretty
badly named file - should rename that file at some point, but keep 8.3
format for DOS (e.g. TheDraw, AcidDraw) compatibility.
mscancfg.msg maybe? Ah, the fun of abbreviating things to 8 chars again.
parent 7a5c6e36
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3906 passed
...@@ -214,7 +214,7 @@ if_true ...@@ -214,7 +214,7 @@ if_true
cmdkey A cmdkey A
auto_message auto_message
end_cmd end_cmd
cmdkey /A cmdkey /A
compare_ars ANSI and not GUEST compare_ars ANSI and not GUEST
if_false if_false
...@@ -265,7 +265,7 @@ cmdkey I ...@@ -265,7 +265,7 @@ cmdkey I
cmdkey J cmdkey J
msg_select_area msg_select_area
end_cmd end_cmd
cmdkey L cmdkey L
msg_list msg_list
end_cmd end_cmd
...@@ -277,7 +277,7 @@ cmdkey /L ...@@ -277,7 +277,7 @@ cmdkey /L
cmdkey W cmdkey W
nodelist_users nodelist_users
end_cmd end_cmd
cmdkey M cmdkey M
minute_bank minute_bank
end_cmd end_cmd
...@@ -387,7 +387,7 @@ cmdkey /* ...@@ -387,7 +387,7 @@ cmdkey /*
end_cmd end_cmd
cmdkey & cmdkey &
call main_cfg exec_bin "msgscancfg"
end_cmd end_cmd
cmdkey # cmdkey #
...@@ -457,50 +457,6 @@ cmdkey Q ...@@ -457,50 +457,6 @@ cmdkey Q
cmd_pop cmd_pop
return return
########################### Main Config Section ##############################
:main_cfg
compare_user_misc UM_expert
if_false
menu maincfg
end_if
async
print "\r\n\1y\1hConfig: \1n"
getcmd ?QNPIS\r
logkey
cmdkey ?
compare_user_misc UM_expert
if_true
menu maincfg
end_if
goto main_cfg
end_cmd
cmdkey N
msg_new_scan_cfg
return
end_cmd
cmdkey S
msg_your_scan_cfg
return
end_cmd
cmdkey P
msg_ptrs_cfg
return
end_cmd
cmdkey I
msg_ptrs_reinit
return
end_cmd
return
########################### File Transfer Section ############################# ########################### File Transfer Section #############################
:file_transfers :file_transfers
...@@ -753,11 +709,11 @@ cmdkey L ...@@ -753,11 +709,11 @@ cmdkey L
cmdkey /L cmdkey /L
nodelist_all nodelist_all
end_cmd end_cmd
cmdkey W cmdkey W
nodelist_users nodelist_users
end_cmd end_cmd
cmdkey N cmdkey N
print "\r\n\1c\1hNew File Scan\r\n" print "\r\n\1c\1hNew File Scan\r\n"
file_new_scan file_new_scan
...@@ -874,7 +830,7 @@ cmdkey & ...@@ -874,7 +830,7 @@ cmdkey &
end_if end_if
crlf crlf
end_cmd end_cmd
cmdkey E cmdkey E
crlf crlf
toggle_user_misc UM_EXTDESC toggle_user_misc UM_EXTDESC
......
...@@ -230,42 +230,7 @@ cmdkey Q ...@@ -230,42 +230,7 @@ cmdkey Q
end_cmd end_cmd
cmdstr C cmdstr C
cmd_home exec_bin "msgscancfg"
menu maincfg
async
print "\r\n\x01y\x01hConfig: \x01n"
getcmd ?QNPIS
logkey
cmdkey ?
compare_ars expert
if_true
menu maincfg
end_if
end_cmd
cmdkey N
msg_new_scan_cfg
end_cmd
cmdkey S
msg_your_scan_cfg
end_cmd
cmdkey P
msg_ptrs_cfg
end_cmd
cmdkey I
msg_ptrs_reinit
end_cmd
cmdkey Q
cmd_pop
end_cmd
end_cmd
cmd_pop
end_cmd end_cmd
cmdkey T cmdkey T
......
// Message Scan Configuration menu
require("sbbsdefs.js", "USER_EXPERT");
"use strict";
const menufile = "maincfg";
while(bbs.online) {
if(!(user.settings & USER_EXPERT))
bbs.menu(menufile);
bbs.nodesync();
console.print("\r\n\x01y\x01hConfig: \x01n");
var key = console.getkeys("?QNPISRW\r");
bbs.log_key(key);
switch(key) {
case '?':
if(user.settings & USER_EXPERT)
bbs.menu(menufile);
continue;
case 'N':
bbs.cfg_msg_scan(SCAN_CFG_NEW);
break;
case 'S':
bbs.cfg_msg_scan(SCAN_CFG_TOYOU);
break;
case 'P':
bbs.cfg_msg_ptrs();
break;
case 'I':
bbs.reinit_msg_ptrs();
break;
case 'R':
bbs.reload_msg_scan();
console.print("\r\nMessage scan configuration and pointers re-loaded.\r\n");
break;
case 'W':
bbs.save_msg_scan();
console.print("\r\nMessage scan configuration and pointers saved.\r\n");
break;
}
exit();
}
...@@ -281,7 +281,7 @@ cmdkey N ...@@ -281,7 +281,7 @@ cmdkey N
end_if end_if
if_true if_true
mail_send_netmail mail_send_netmail
else else
mail_send_netfile mail_send_netfile
end_if end_if
end_cmd end_cmd
...@@ -316,50 +316,6 @@ if_true ...@@ -316,50 +316,6 @@ if_true
crlf crlf
end_cmd end_cmd
########################### Main Config Section ##############################
:main_cfg
compare_ars expert
if_false
menu maincfg
end_if
async
print "\r\n\x01y\x01hConfig: \x01n"
getcmd ?QNPIS\r
logkey
cmdkey ?
compare_ars expert
if_true
menu maincfg
end_if
goto main_cfg
end_cmd
cmdkey N
msg_new_scan_cfg
return
end_cmd
cmdkey S
msg_your_scan_cfg
return
end_cmd
cmdkey P
msg_ptrs_cfg
return
end_cmd
cmdkey I
msg_ptrs_reinit
return
end_cmd
return
########################### File Transfer Section ############################# ########################### File Transfer Section #############################
:file_transfers :file_transfers
...@@ -530,7 +486,7 @@ cmdkey L ...@@ -530,7 +486,7 @@ cmdkey L
cmdkey /L cmdkey /L
nodelist_all nodelist_all
end_cmd end_cmd
cmdkey W cmdkey W
nodelist_users nodelist_users
end_cmd end_cmd
...@@ -748,7 +704,7 @@ cmdkey C ...@@ -748,7 +704,7 @@ cmdkey C
cmdkey /L cmdkey /L
nodelist_all nodelist_all
end_cmd end_cmd
cmdkey W cmdkey W
nodelist_users nodelist_users
end_cmd end_cmd
...@@ -818,7 +774,7 @@ cmdkey Y ...@@ -818,7 +774,7 @@ cmdkey Y
end_cmd end_cmd
cmdkey Z cmdkey Z
call main_cfg exec_bin "msgscancfg"
end_cmd end_cmd
cmdkey # cmdkey #
......
...@@ -468,7 +468,7 @@ if_true ...@@ -468,7 +468,7 @@ if_true
nodelist_all nodelist_all
return return
end_if end_if
compare_word who compare_word who
if_true if_true
nodelist_users nodelist_users
...@@ -556,7 +556,7 @@ cmdstr "dir" ...@@ -556,7 +556,7 @@ cmdstr "dir"
end_cmd end_cmd
cmdstr "config" cmdstr "config"
call main_cfg exec_bin "msgscancfg"
end_cmd end_cmd
cmdstr "send" cmdstr "send"
...@@ -648,47 +648,4 @@ cmdstr "readmsgs" ...@@ -648,47 +648,4 @@ cmdstr "readmsgs"
call global call global
end_cmd end_cmd
########################### Main Config Section ##############################
:main_cfg
compare_user_misc UM_expert
if_false
menu maincfg
end_if
async
print "\r\n\x01y\x01hConfig: \x01n"
getcmd ?QNPIS\r
logkey
cmdkey ?
compare_user_misc UM_expert
if_true
menu maincfg
end_if
goto main_cfg
end_cmd
cmdkey N
msg_new_scan_cfg
return
end_cmd
cmdkey S
msg_your_scan_cfg
return
end_cmd
cmdkey P
msg_ptrs_cfg
return
end_cmd
cmdkey I
msg_ptrs_reinit
return
end_cmd
return
# End of SDOS.SRC # End of SDOS.SRC
...@@ -154,7 +154,7 @@ cmdstr R ...@@ -154,7 +154,7 @@ cmdstr R
end_cmd end_cmd
cmdstr C cmdstr C
call msg_cfg exec_bin "msgscancfg"
end_cmd end_cmd
# Quit back to main menu # Quit back to main menu
...@@ -349,37 +349,4 @@ if_true ...@@ -349,37 +349,4 @@ if_true
end_if end_if
return return
########################### Msg Config Section ##############################
:msg_cfg
menu maincfg
async
print "\r\n\x01y\x01hCommand: \x01n"
getstrupr 10
logkey
cmdkey N
msg_new_scan_cfg
return
end_cmd
cmdkey S
msg_your_scan_cfg
return
end_cmd
cmdkey P
msg_ptrs_cfg
return
end_cmd
cmdkey I
msg_ptrs_reinit
return
end_cmd
return
#end of SIMPLE.SRC #end of SIMPLE.SRC
...@@ -399,43 +399,7 @@ cmdkey C ...@@ -399,43 +399,7 @@ cmdkey C
end_cmd end_cmd
cmdkey U cmdkey U
cmd_home exec_bin "msgscancfg"
compare_ars expert
if_false
menu maincfg
end_if
async
print "\r\n\x01y\x01hConfig: \x01n"
getcmd ?QNPIS
logkey
cmdkey ?
compare_ars expert
if_true
menu maincfg
end_if
end_cmd
cmdkey N
msg_new_scan_cfg
end_cmd
cmdkey S
msg_your_scan_cfg
end_cmd
cmdkey P
msg_ptrs_cfg
end_cmd
cmdkey I
msg_ptrs_reinit
end_cmd
cmdkey Q
cmd_pop
end_cmd
end_cmd end_cmd
cmdkey H cmdkey H
...@@ -531,9 +495,9 @@ cmdkey D ...@@ -531,9 +495,9 @@ cmdkey D
if_true if_true
compare_ars "UNIX" compare_ars "UNIX"
if_true if_true
exec_int "%y -i" exec_int "%y -i"
else else
exec_int "%y" exec_int "%y"
end_if end_if
end_if end_if
end_cmd end_cmd
......
...@@ -170,7 +170,7 @@ cmdkey L ...@@ -170,7 +170,7 @@ cmdkey L
cmdkey /L cmdkey /L
nodelist_users nodelist_users
end_cmd end_cmd
cmdkey W cmdkey W
nodelist_all nodelist_all
end_cmd end_cmd
...@@ -273,7 +273,7 @@ cmdkey /* ...@@ -273,7 +273,7 @@ cmdkey /*
end_cmd end_cmd
cmdkey & cmdkey &
call main_cfg exec_bin "msgscancfg"
end_cmd end_cmd
cmdkey # cmdkey #
...@@ -342,49 +342,6 @@ cmdkey Q ...@@ -342,49 +342,6 @@ cmdkey Q
cmd_pop cmd_pop
return return
########################### Main Config Section ##############################
:main_cfg
compare_ars expert
if_false
menu MAINCFG
end_if
async
print "\r\n\x01y\x01hConfig: \x01n"
getcmd ?QNPIS\r
logkey
cmdkey ?
compare_ars expert
if_true
menu MAINCFG
end_if
goto main_cfg
end_cmd
cmdkey N
msg_new_scan_cfg
return
end_cmd
cmdkey S
msg_your_scan_cfg
return
end_cmd
cmdkey P
msg_ptrs_cfg
return
end_cmd
cmdkey I
msg_ptrs_reinit
return
end_cmd
return
########################### File Transfer Section ############################# ########################### File Transfer Section #############################
:file_transfers :file_transfers
...@@ -570,7 +527,7 @@ cmdkey L ...@@ -570,7 +527,7 @@ cmdkey L
cmdkey /L cmdkey /L
nodelist_users nodelist_users
end_cmd end_cmd
cmdkey W cmdkey W
nodelist_all nodelist_all
end_cmd end_cmd
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
W HCSY NCAreas to scan for your messagesWB W HCSY NCAreas to scan for your messagesWB
HCP NCSet new-scan pointersWB HCP NCSet new-scan pointersWB
HCI NCReinitialize new-scan pointersWB HCI NCReinitialize new-scan pointersWB
HCR NCReload new-scan config & pointers WB
HCW NCSave new-scan config & pointers WB
۲IJ ۲IJ
HCQ NCQuit to Main menuWB HCQ NCQuit to Main/Message menu WB
Z Z
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment