Browse Source

updated menus

main
deicidus 2 years ago
parent
commit
6f89acb1e6
  1. 3
      spells/menu/mud-admin
  2. 25
      spells/menu/mud-install-menu
  3. 2
      spells/menu/mud-menu

3
spells/menu/mud-admin

@ -8,10 +8,9 @@ display_menu() {
add="Add authorized player%add-player" add="Add authorized player%add-player"
list_players="List authorized players%new-player" list_players="List authorized players%new-player"
list_rooms="List shared rooms%list-rooms" list_rooms="List shared rooms%list-rooms"
install="Install%mud-install-menu"
exit="Exit%kill -2 $$" # Commands are run with 'eval' by the menu script, so we can't simply say 'exit'. The keyword $$ gets this scripts PID and the -2 code is SIGINT aka Ctrl-C exit="Exit%kill -2 $$" # Commands are run with 'eval' by the menu script, so we can't simply say 'exit'. The keyword $$ gets this scripts PID and the -2 code is SIGINT aka Ctrl-C
menu "MUD main menu:" "$change" "$new" "$install" "$exit" menu "MUD main menu:" "$add" "$list_players" "$list_rooms" "$exit"
} }
# Catch Ctrl-C and exit # Catch Ctrl-C and exit

25
spells/menu/mud-install-menu

@ -0,0 +1,25 @@
#!/bin/sh
# This spell displays the ao-mud install menu.
. colors
SCRIPT_DIR=$( cd ${0%/*} && pwd -P )
display_menu() {
tor="Set up tor hidden service%$SCRIPT_DIR/../installers/setup/tor"
exit="Exit%kill -2 $$" # Commands are run with 'eval' by the menu script, so we can't simply say 'exit'. The keyword $$ gets this scripts PID and the -2 code is SIGINT aka Ctrl-C
menu "MUD main menu:" "$tor" "$exit"
}
# Catch Ctrl-C and exit
handle_ctrl_c() {
trap 'echo exiting; exit' INT
}
handle_ctrl_c
while true; do
display_menu
done

2
spells/menu/mud-menu

@ -10,6 +10,8 @@ display_menu() {
home="Teleport Home%cd" home="Teleport Home%cd"
jump="Teleport to Marker%jump" jump="Teleport to Marker%jump"
portal="Teleport to Portal Chamber%cd /mnt" portal="Teleport to Portal Chamber%cd /mnt"
install="Install MUD%mud-install-menu"
admin="Admin MUD Hosting%mud-admin"
settings="MUD Settings%mud-settings" settings="MUD Settings%mud-settings"
exit="Exit%kill -2 $$" # Commands are run with 'eval' by the menu script, so we can't simply say 'exit'. The keyword $$ gets this scripts PID and the -2 code is SIGINT aka Ctrl-C exit="Exit%kill -2 $$" # Commands are run with 'eval' by the menu script, so we can't simply say 'exit'. The keyword $$ gets this scripts PID and the -2 code is SIGINT aka Ctrl-C

Loading…
Cancel
Save