lochat.sh: did some shit

Former-commit-id: 849f25c34ffd3bc87f099aa39d27abd2d9ad3476
This commit is contained in:
mollusk 2018-10-29 23:18:17 -07:00
parent 371a93d751
commit 4dba502f2d

View File

@ -16,38 +16,87 @@ LPURPLE="\033[1;35m"
BWHITE="\e[1m"
NC='\033[0m' # No Color
VOICEON="false"
VOICEON="true"
#VoicControl (){
if [ "${VOICEON}" = "true" ];then
MODE="espeak"
elif [ "${VOICEON}" = "false" ];then
MODE="echo"
MODE=""
fi
#}
printf "${LBLUE}What is the name of person 1?:${NC} "
read person1
${MODE} "${person1} Joined the chat"
if [ "${MODE}" = "espeak" ];then
espeak "${person1} Joined the chat" &
echo "${person1} Joined the chat"
else
echo "${person1} Joined the chat"
fi
printf "${LPURPLE}What is the name of person 2?:${NC} "
read person2
${MODE} "${person2} joined the chat"
if [ "${MODE}" = "espeak" ];then
espeak "${person2} Joined the chat" &
echo "${person2} Joined the chat"
else
echo "${person2} Joined the chat"
fi
echo -e "${LCYAN}Type 'quit' to exit the chat${NC}\n"
while true;do
printf "${LGREEN}${person1}:${NC} "
read something1
#printf "${LGREEN}${person1}:${NC} "
read something1
if [ ! -z "${something1}" ];then
echo -e "${LGREEN}${person1}: ${something1}${NC}\n"
continue
elif [ "${something1}" = "quit" ];then
echo -e "${LRED}${person1} exited the chat!${NC}\n"
exit 0
else
continue
fi
printf "${YELLOW}${person2}:${NC} "
read something2
#printf "${YELLOW}${person2}:${NC} "
read something2
if [ ! -z "${something2}" ];then
echo -e "${YELLOW}${person2}: ${something2}${NC}\n"
continue
elif [ "${something2}" = "quit" ];then
echo -e "${LRED}${person2} exited the chat!${NC}\n"
exit 0
else
continue
fi
done