stormbot/functions.sh

27 lines
332 B
Bash
Raw Normal View History

#!/bin/bash
if [ -z "$input" ]; then
2016-09-05 21:44:04 -04:00
input=".botinput"
fi
msg()
{
2016-09-05 21:44:04 -04:00
local msg="PRIVMSG $1 :"
shift
2016-09-05 21:44:04 -04:00
echo -en "${msg}$@\r\n" | tee -a "$input"
}
reply()
{
shift
local msg="PRIVMSG $1 :"
2016-09-05 21:44:04 -04:00
echo -en "${msg}$@\r\n" | tee -a "$input"
}
2016-09-04 12:43:22 -04:00
act()
{
local msg="PRIVMSG $1 :\x01ACTION"
shift
2016-09-05 21:44:04 -04:00
echo -en "$msg $@\x01\r\n" | tee -a "$input"
2016-09-04 12:43:22 -04:00
}