summaryrefslogtreecommitdiff
path: root/shbot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shbot.sh')
-rwxr-xr-xshbot.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/shbot.sh b/shbot.sh
index cba3b01..3a0e7ca 100755
--- a/shbot.sh
+++ b/shbot.sh
@@ -12,12 +12,13 @@ do
echo "PONG :${BASH_REMATCH[1]}" >&3
sleep 0.1
else
+ [[ ${LINE} =~ :[a-zA-Z]*!.*(#.*)\ :.* ]] && ORIGIN=${BASH_REMATCH[1]}
echo "${LINE}" | ./shbrain.sh | \
while true
do
read ANSWER || break
echo "--> "$ANSWER
- echo $ANSWER >&3
+ echo "PRIVMSG $ORIGIN :"$ANSWER >&3
done
fi
done