coin module.
This commit is contained in:
19
functions.sh
19
functions.sh
@ -1,35 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$input" ]; then
|
||||
input=".bot.cfg"
|
||||
input=".botinput"
|
||||
fi
|
||||
|
||||
msg()
|
||||
{
|
||||
local msg="PRIVMSG $1"
|
||||
local msg="PRIVMSG $1 :"
|
||||
shift
|
||||
echo "$msg $@" | tee -a "$input"
|
||||
echo -en "${msg}$@\r\n" | tee -a "$input"
|
||||
}
|
||||
|
||||
reply()
|
||||
{
|
||||
shift
|
||||
local msg="PRIVMSG $1 :"
|
||||
echo "$msg $@" | tee -a "$input"
|
||||
echo -en "${msg}$@\r\n" | tee -a "$input"
|
||||
}
|
||||
|
||||
act()
|
||||
{
|
||||
local msg="PRIVMSG $1 :\x01ACTION"
|
||||
shift
|
||||
echo -e "$msg $@\x01" | tee -a "$input"
|
||||
echo -en "$msg $@\x01\r\n" | tee -a "$input"
|
||||
}
|
||||
|
||||
close_bot()
|
||||
{
|
||||
echo "QUIT :$quitMessage" >> "$input"
|
||||
echo "exiting..."
|
||||
sleep 10
|
||||
}
|
||||
|
||||
trap close_bot EXIT $?
|
||||
|
Reference in New Issue
Block a user