2016-09-03 00:14:12 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-09-03 01:38:30 -04:00
|
|
|
if [ -z "$input" ]; then
|
2016-09-05 21:44:04 -04:00
|
|
|
input=".botinput"
|
2016-09-03 01:38:30 -04:00
|
|
|
fi
|
|
|
|
|
2016-09-03 00:14:12 -04:00
|
|
|
msg()
|
|
|
|
{
|
2016-09-05 21:44:04 -04:00
|
|
|
local msg="PRIVMSG $1 :"
|
2016-09-03 00:14:12 -04:00
|
|
|
shift
|
2016-09-05 21:44:04 -04:00
|
|
|
echo -en "${msg}$@\r\n" | tee -a "$input"
|
2016-09-03 00:14:12 -04:00
|
|
|
}
|
|
|
|
|
2016-09-05 13:54:42 -04:00
|
|
|
reply()
|
|
|
|
{
|
|
|
|
shift
|
|
|
|
local msg="PRIVMSG $1 :"
|
2016-09-05 21:44:04 -04:00
|
|
|
echo -en "${msg}$@\r\n" | tee -a "$input"
|
2016-09-05 13:54:42 -04:00
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|