irc configuration menu style

This commit is contained in:
Bob Mottram 2018-04-04 13:00:11 +01:00
parent 383619b029
commit caf8fa57e8
1 changed files with 11 additions and 17 deletions

View File

@ -398,28 +398,22 @@ function configure_interactive_irc {
return return
fi fi
W=(1 $"Set a password for all IRC users"
2 $"Show current IRC login password")
while true while true
do do
data=$(mktemp 2>/dev/null) # shellcheck disable=SC2068
dialog --backtitle $"Freedombone Control Panel" \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"IRC" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
--title $"IRC Menu" \
--radiolist $"Choose an operation:" 14 70 4 \ if [ ! "$selection" ]; then
1 $"Set a password for all IRC users" off \ break
2 $"Show current IRC login password" off \ fi
3 $"Exit" on 2> "$data"
sel=$? case $selection in
case $sel in
1) rm -f "$data"
break;;
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) irc_set_global_password;; 1) irc_set_global_password;;
2) irc_show_password;; 2) irc_show_password;;
3) break;;
esac esac
rm -f "$data"
done done
} }