lochat.sh: did some shit
Former-commit-id: 849f25c34ffd3bc87f099aa39d27abd2d9ad3476
This commit is contained in:
parent
371a93d751
commit
4dba502f2d
61
lochat.sh
61
lochat.sh
@ -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} "
|
||||
#printf "${LGREEN}${person1}:${NC} "
|
||||
read something1
|
||||
|
||||
if [ ! -z "${something1}" ];then
|
||||
echo -e "${LGREEN}${person1}: ${something1}${NC}\n"
|
||||
|
||||
|
||||
printf "${YELLOW}${person2}:${NC} "
|
||||
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
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user