client command can configure hexchat

This commit is contained in:
Bob Mottram 2016-11-01 22:31:30 +00:00
parent 6aa70353bf
commit 4b018c9cf0
2 changed files with 63 additions and 0 deletions

Binary file not shown.

View File

@ -39,6 +39,9 @@ fi
MESH_CLIENT_INSTALL=
ENABLE_MONKEYSPHERE=
# setup for a specific app
SETUP_CLIENT_APP_NAME=
# Version number of this script
VERSION="1.01"
@ -202,6 +205,61 @@ function show_help {
exit 0
}
function setup_client_app_irc {
echo $'Setting up hexchat'
if [ ! -f /usr/bin/pacman ]; then
sudo apt-get -yq install tor hexchat tor
else
sudo pacman -S --noconfirm hexchat tor
fi
if [ ! -d /home/$CURR_USER/.config/hexchat ]; then
mkdir -p /home/$CURR_USER/.config/hexchat
fi
echo 'net_proxy_host = 127.0.0.1' > /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'net_proxy_port = 9050' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'net_proxy_type = 3' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'net_proxy_use = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'net_proxy_auth = 1' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'net_proxy_pass = HexChat' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'net_proxy_user = HexChat' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'dcc_auto_chat = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'dcc_auto_resume = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'dcc_auto_send = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'irc_hide_version = 1' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'identd = 0' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'away_reason =' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'irc_part_reason =' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'irc_quit_reason =' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo "irc_real_name = ${USER}" >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo "irc_user_name = ${USER}" >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo "irc_nick1 = ${USER}" >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo "irc_nick2 = ${USER}_" >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo "irc_nick3 = ${USER}__" >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'completion_suffix = :' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo 'gui_slist_skip = 1' >> /home/$CURR_USER/.config/hexchat/hexchat.conf
echo $'hexchat configured'
}
function setup_client_app {
if [ ! $SETUP_CLIENT_APP_NAME ]; then
return
fi
case $SETUP_CLIENT_APP_NAME in
hexchat|xchat|irc)
setup_client_app_irc
;;
esac
exit 0
}
while [[ $# > 1 ]]
do
key="$1"
@ -218,6 +276,10 @@ do
shift
WIFI_CHANNEL=${1}
;;
-s|--setup)
shift
SETUP_CLIENT_APP_NAME=${1}
;;
-m|--mesh)
shift
MESH_CLIENT_INSTALL=${1}
@ -234,6 +296,7 @@ do
done
echo $'Configuring client'
setup_client_app
refresh_gpg_keys
configure_ssh_client
global_rate_limit