More code cleanup on the main bot and its supporting functions.

This commit is contained in:
Storm Dragon
2020-08-18 19:40:26 -04:00
parent c5f5c41a7d
commit 0eccf775da
2 changed files with 30 additions and 22 deletions

View File

@@ -8,30 +8,26 @@ close_bot() {
echo -en "QUIT :${quitMessage}\r\n" >> "$input"
}
msg()
{
local msg="PRIVMSG $1 :"
shift
echo -en "${msg}$@\r\n" | tee -a "$input"
msg() {
local msg="PRIVMSG $1 :"
shift
echo -en "${msg}$@\r\n" | tee -a "$input"
}
nick()
{
local msg="NICK $1"
shift
echo -en "${msg}\r\n" | tee -a "$input"
nick() {
local msg="NICK $1"
shift
echo -en "${msg}\r\n" | tee -a "$input"
}
reply()
{
shift
local msg="PRIVMSG $1 :"
echo -en "${msg}$@\r\n" | tee -a "$input"
reply() {
shift
local msg="PRIVMSG $1 :"
echo -en "${msg}$@\r\n" | tee -a "$input"
}
act()
{
local msg="PRIVMSG $1 :\x01ACTION"
shift
echo -en "$msg $@\x01\r\n" | tee -a "$input"
act() {
local msg="PRIVMSG $1 :\x01ACTION"
shift
echo -en "$msg $@\x01\r\n" | tee -a "$input"
}