lochat.sh: make quit work and alternate between both people
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,48 +55,28 @@ fi
|
||||
echo -e "${LCYAN}Type 'quit' to exit the chat${NC}\n"
|
||||
while true;do
|
||||
|
||||
|
||||
|
||||
|
||||
#printf "${LGREEN}${person1}:${NC} "
|
||||
read something1
|
||||
read something1
|
||||
|
||||
if [ ! -z "${something1}" ];then
|
||||
echo -e "${LGREEN}${person1}: ${something1}${NC}\n"
|
||||
|
||||
|
||||
continue
|
||||
|
||||
|
||||
|
||||
elif [ "${something1}" = "quit" ];then
|
||||
if [ "${something1}" = "quit" ];then
|
||||
|
||||
echo -e "${LRED}${person1} exited the chat!${NC}\n"
|
||||
exit 0
|
||||
|
||||
else
|
||||
continue
|
||||
elif [ -n "${something1}" ];then
|
||||
echo -e "${LGREEN}${person1}: ${something1}${NC}\n"
|
||||
fi
|
||||
|
||||
|
||||
#printf "${YELLOW}${person2}:${NC} "
|
||||
read something2
|
||||
read something2
|
||||
|
||||
if [ ! -z "${something2}" ];then
|
||||
echo -e "${YELLOW}${person2}: ${something2}${NC}\n"
|
||||
|
||||
|
||||
continue
|
||||
|
||||
|
||||
|
||||
|
||||
elif [ "${something2}" = "quit" ];then
|
||||
if [ "${something2}" = "quit" ];then
|
||||
|
||||
echo -e "${LRED}${person2} exited the chat!${NC}\n"
|
||||
exit 0
|
||||
|
||||
else
|
||||
continue
|
||||
elif [ -n "${something2}" ];then
|
||||
echo -e "${YELLOW}${person2}: ${something2}${NC}\n"
|
||||
fi
|
||||
|
||||
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user