From Newsgroup: alt.bbs.synchronet
Here's the snippet of my SRC file... Main menu... Hangs up on caller if they pressed any key that's not put in the file..
:Start
# renegade.src
# $Id: renegade.src,v 1.16 2020/09/12 02:46:09 rswindell Exp $
# @format.tab-size 8, @format.use-tabs true
!include sbbsdefs.inc
################################# Begins Here ################################# or _sys_misc SM_RA_EMU # Swap Msg ReRead/Reply commands
:main
# Set return point for main menu commands (via end_cmd)
cmd_home
# Display text/menu/main.* if not in expert mode
compare_ars expert
if_false
cls
menu joesbbs/main
end_if
# Update node status
node_action node_main
async
# Display main Prompt
print " \1n\1c[\1h@GN@\1n\1c] @GRP@\1\\ [\1h@SN@\1n\1c] @SUB@: \1n"
# Get key (with / extended commands allowed)
compare_user_misc UM_COLDKEYS
if_false
getkeye
else
getstrupr 60
endif
# Do nothing for control keys and space
cmdkey ^@
end_cmd
cmdkey ^M
end_cmd
cmdkey ^S
end_cmd
cmdkey "
end_cmd
# Write command to log file
logkey_comma
# Show the key hit
compare_user_misc UM_COLDKEYS
if_false
printkey
endif
compare_user_misc UM_COLDKEYS
if_false
crlf
end_if
pause_reset
# Menu
cmdkey ?
compare_ars expert
if_true
cls
menu joesbbs/main
end_if
end_cmd
# Sysop Menu
compare_ars SYSOP or exempt Q or I or N
if_true
cmdkey !
call sysop
end_cmd
end_if
# Commands
cmdkey M
cmd_pop
goto message
end_cmd
cmdkey F
cmd_pop
goto file_transfers
end_cmd
cmdkey D
xtrn_section
end_cmd
cmdkey Q
msg_qwk
end_cmd
cmdkey C
exec_bin chat_sec
end_cmd
cmdkey E
cmd_pop
goto E-mail
end_cmd
cmdkey P
auto_message
end_cmd
cmdkey G
file_download_batch
if_true
end_cmd
end_if
logoff
end_cmd
cmdkey /G
file_download_batch
if_true
end_cmd
end_if
logoff_fast
end_cmd
cmdkey U
userlist_all
end_cmd
cmdkey L
userlist_logons
end_cmd
cmdkey /L
nodelist_all
end_cmd
cmdkey /N
setstr "1"
mail_send_feedback
end_cmd
cmdkey Y
user_defaults
exec_bin "termsetup"
end_cmd
cmdkey I
call main_info
end_cmd
cmdkey /A
compare_ars ANSI and not GUEST
if_false
print "\r\nSorry, only regular users with ANSI terminals can do that.\r\n"
else
print "Selecting your avatar..."
exec_bin avatar_chooser
# an alternative approach (uses the configured xtrn/door):
# exec_xtrn avatchoo
end_if
# fall through
print "\r\n\x01c\x01hUnrecognized command."
compare_ars expert
if_true
print " Hit '\x01i?\x01n\x01c\x01h' for a menu."
end_if
crlf
end_cmd
# shouldn't hit next line
print "Problem in command shell."
pause
hangup
:stop
Thanx
IB Joe
AKA Joe Schweier
SysOp Joe's BBS
JoesBBS.com
---
þ Synchronet þ JoesBBS.Com, Telnet:2323 SSH:2222 HTTPS:8080
--- Synchronet 3.19a-Win32 NewsLink 1.113
* Vertrauen - Riverside County, California -
telnet://vert.synchro.net
--- Synchronet 3.19c-Linux NewsLink 1.113