Try to cut down on some of the messages in the bot's output window.
This commit is contained in:
parent
af23b70255
commit
3d8c2adde7
6
bot.sh
6
bot.sh
@ -25,7 +25,7 @@ echo "JOIN #$channel" | tee -a "$input"
|
||||
tail -f "$input" | telnet "$server" "$port" | while read result
|
||||
do
|
||||
# log the session
|
||||
echo "$(date "+[$dateFormat]") $result" | tee -a "$log"
|
||||
echo "$(date "+[$dateFormat]") $result" >> "$log"
|
||||
# do things when you see output
|
||||
case "$result" in
|
||||
# respond to ping requests from the server
|
||||
@ -83,7 +83,7 @@ set +f
|
||||
;;
|
||||
# run when a message is seen
|
||||
*PRIVMSG*)
|
||||
echo "$result" | tee -a "$log"
|
||||
echo "$result" >> "$log"
|
||||
who="${result%%!*}"
|
||||
who="${who:1}"
|
||||
from="${result#*#}"
|
||||
@ -139,7 +139,7 @@ set -f
|
||||
set +f
|
||||
;;
|
||||
*)
|
||||
echo "$result" | tee -a "$log"
|
||||
echo "$result" >> "$log"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user