Tried to handle quitting gracefully, but not working so far.
This commit is contained in:
15
functions.sh
15
functions.sh
@ -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 $?
|
||||
|
Reference in New Issue
Block a user