-
Rob Swindell authored
This includes a new JS bbs method: bbs.chat_sec() And the old command shells written in Baja now call the PCMS chat_section function, as they used to, rather than hard-coding the name of the module to execute.
Rob Swindell authoredThis includes a new JS bbs method: bbs.chat_sec() And the old command shells written in Baja now call the PCMS chat_section function, as they used to, rather than hard-coding the name of the module to execute.
major.src 4.18 KiB
# MajorBBS Clone Command Shell for Synchronet
# @format.tab-size 8, @format.use-tabs true
!include sbbsdefs.inc
:main
cmd_home
menu major/main
getstr 10
compare_str ""
if_true
end_cmd
end_if
ungetstr
getkey
node_action node_main
logkey_comma
cmdkey ?
end_cmd
cmdkey T
chat_section
end_cmd
cmdkey I
text_file_section
end_cmd
cmdkey F
call message
end_cmd
cmdkey E
cmd_home
menu major/email
getstr 10
compare_str ""
if_true
end_cmd
end_if
ungetstr
getkey
logkey
cmdkey R
mail_read
end_cmd
cmdkey W
print "\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w"
getname 40
compare_str ""
if_true
end_cmd
end_if
compare_str "SYSOP"
if_true
setstr "1"
end_if
mail_send
end_cmd
cmdkey S
int i
copy i _netmail_misc
or i _inetmail_misc
and i NMAIL_FILE
compare i 0
if_false
no_yes "\r\nAttach a file"
end_if
if_true
mail_send_netmail
else
mail_send_netfile
end_if
end_cmd
cmdkey U
print "\x01_\r\n\x01b\x01hE-mail (User name or number): \x01w"
getname 40
compare_str ""
if_true
end_cmd
end_if
compare_str "SYSOP"
if_true
setstr "1"
end_if
mail_send_file
end_cmd
cmdkey E
mail_read_sent
end_cmd
cmdkey X
cmd_pop
end_cmd
end_cmd
cmdkey L
call transfers
end_cmd
cmdkey D
xtrn_section
end_cmd
cmdkey A
cmd_home
menu major/userdefs
getstr 10
compare_str ""
if_true
end_cmd
end_if
ungetstr
getkey
logkey
cmdkey S
info_user
end_cmd
cmdkey A
user_defaults
exec_bin "termsetup"
end_cmd
cmdkey X
cmd_pop
end_cmd
end_cmd
cmdkey R
print "\r\n\x01c\x01hList Users\r\n"
mnemonics "\r\n~Logons Today, ~Sub-board, or ~All: "
getcmd LSA\r
cmdkey L
userlist_logons
end_cmd
cmdkey S
userlist_sub
end_cmd
cmdkey A
userlist_all
end_cmd
# fall-through for CR, Ctrl-C, etc
end_cmd
cmdkey S
compare_ars SYSOP or exempt Q or I or N
if_true
call sysop
end_if
end_cmd
cmdkey X
file_download_batch
if_true
end_cmd
end_if
logoff
end_cmd
end_cmd
############################### Message Section ###############################
:message
cmd_home
menu major/msg
getstr 10
compare_str ""
if_true
end_cmd
end_if
ungetstr
getkey
# Update node status
node_action node_main
logkey_comma
cmdkey ?
end_cmd
cmdkey X
cmd_pop
return
end_cmd
cmdkey R
msg_read
end_cmd
cmdkey W
msg_post
end_cmd
cmdkey Q
cmd_home
menu major/quickscn
getstr 10
compare_str ""
if_true
end_cmd
end_if
ungetstr
getkey
logkey
cmdstr S
msg_new_scan
end_cmd
cmdstr L
msg_your_scan
end_cmd
cmdstr K
msg_find_text
end_cmd
cmdstr C
cmd_home
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
cmdkey T
chat_section
end_cmd
cmdkey S
msg_select_area
end_cmd
cmdkey F
call transfers
end_cmd
cmd_pop
return
############################ Transfer Menu Commands ###########################
:transfers
cmd_home
menu major/file
getstr 10
compare_str ""
if_true
end_cmd
end_if
ungetstr
getkey
logkey
cmdkey F
print "\r\n\x01c\x01hList Files\r\n"
getfilespec
if_true
file_list
end_if
end_cmd
cmdkey D
print "\r\n\x01c\x01hDownload File(s)\r\n"
file_download_batch
if_true
end_cmd
end_if
getfilespec
if_true
file_download
end_if
end_cmd
cmdkey U
print "\r\n\x01c\x01hUpload File\r\n"
chkfile "%zmenu/upload.*"
if_true
menu upload
end_if
file_upload
end_cmd
cmdkey S
file_select_area
end_cmd
cmdkey X
cmd_pop
return
end_cmd
end_cmd
############################## Sysop Commands #################################
:sysop
menu sysmain
print "\x01n\r\n\x01c\x01hSelect an option (or X to exit): \x01n"
getstrupr 40
compare_str "X"
if_true
return
end_if
exec_bin "str_cmds %s"
goto sysop