lochat.sh: did some shit
Former-commit-id: 849f25c34ffd3bc87f099aa39d27abd2d9ad3476
This commit is contained in:
parent
371a93d751
commit
4dba502f2d
65
lochat.sh
65
lochat.sh
@ -16,38 +16,87 @@ LPURPLE="\033[1;35m"
|
|||||||
BWHITE="\e[1m"
|
BWHITE="\e[1m"
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
VOICEON="false"
|
VOICEON="true"
|
||||||
|
|
||||||
|
|
||||||
#VoicControl (){
|
#VoicControl (){
|
||||||
if [ "${VOICEON}" = "true" ];then
|
if [ "${VOICEON}" = "true" ];then
|
||||||
MODE="espeak"
|
MODE="espeak"
|
||||||
elif [ "${VOICEON}" = "false" ];then
|
elif [ "${VOICEON}" = "false" ];then
|
||||||
MODE="echo"
|
MODE=""
|
||||||
fi
|
fi
|
||||||
#}
|
#}
|
||||||
|
|
||||||
printf "${LBLUE}What is the name of person 1?:${NC} "
|
printf "${LBLUE}What is the name of person 1?:${NC} "
|
||||||
read person1
|
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} "
|
printf "${LPURPLE}What is the name of person 2?:${NC} "
|
||||||
read person2
|
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
|
while true;do
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf "${LGREEN}${person1}:${NC} "
|
#printf "${LGREEN}${person1}:${NC} "
|
||||||
read something1
|
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} "
|
#printf "${YELLOW}${person2}:${NC} "
|
||||||
read something2
|
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
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user