the bot can now exit gracefully.

This commit is contained in:
Storm Dragon
2020-08-17 21:20:12 -04:00
parent cce7ef88dc
commit 45447d2e77
4 changed files with 31 additions and 13 deletions

View File

@ -1,9 +1,13 @@
#!/bin/bash
if [ -z "$input" ]; then
input=".botinput"
if [[ -z "$input" ]]; then
input="$(mktemp .XXXXXX)"
fi
close_bot() {
echo -en "QUIT :${quitMessage}\r\n" >> "$input"
}
msg()
{
local msg="PRIVMSG $1 :"