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"
|
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
|
if [ "${something1}" = "quit" ];then
|
||||||
echo -e "${LGREEN}${person1}: ${something1}${NC}\n"
|
|
||||||
|
|
||||||
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elif [ "${something1}" = "quit" ];then
|
|
||||||
|
|
||||||
echo -e "${LRED}${person1} exited the chat!${NC}\n"
|
echo -e "${LRED}${person1} exited the chat!${NC}\n"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
else
|
elif [ -n "${something1}" ];then
|
||||||
continue
|
echo -e "${LGREEN}${person1}: ${something1}${NC}\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#printf "${YELLOW}${person2}:${NC} "
|
#printf "${YELLOW}${person2}:${NC} "
|
||||||
read something2
|
read something2
|
||||||
|
|
||||||
if [ ! -z "${something2}" ];then
|
if [ "${something2}" = "quit" ];then
|
||||||
echo -e "${YELLOW}${person2}: ${something2}${NC}\n"
|
|
||||||
|
|
||||||
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elif [ "${something2}" = "quit" ];then
|
|
||||||
|
|
||||||
echo -e "${LRED}${person2} exited the chat!${NC}\n"
|
echo -e "${LRED}${person2} exited the chat!${NC}\n"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
else
|
elif [ -n "${something2}" ];then
|
||||||
continue
|
echo -e "${YELLOW}${person2}: ${something2}${NC}\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user