Tried to handle quitting gracefully, but not working so far.

This commit is contained in:
Storm Dragon
2016-09-05 13:54:42 -04:00
parent 056eec6025
commit af18b6c47a
2 changed files with 17 additions and 0 deletions

View File

@ -11,6 +11,13 @@ shift
echo "$msg $@" | tee -a "$input"
}
reply()
{
shift
local msg="PRIVMSG $1 :"
echo "$msg $@" | tee -a "$input"
}
act()
{
local msg="PRIVMSG $1 :\x01ACTION"
@ -18,3 +25,11 @@ shift
echo -e "$msg $@\x01" | tee -a "$input"
}
close_bot()
{
echo "QUIT :$quitMessage" >> "$input"
echo "exiting..."
sleep 10
}
trap close_bot EXIT $?