summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hack_of_all_hacks13
1 files changed, 9 insertions, 4 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks
index 13d3db1..31dd0da 100644
--- a/hack_of_all_hacks
+++ b/hack_of_all_hacks
@@ -250,11 +250,16 @@ EOF
message="${process#*:}"
message="${message# }"
- [[ -d "announcements/people/${subject}" ]] || mkdir -p "announcements/people/${subject}"
- echo "${personoslash} told me to tell you: ${message}" >> "announcements/people/${subject}/messages"
+ if "${subject}" == "${my_own_name}"
+ then
+ send_msg "${channel_it_came_from}" "${my_own_name}: ${personoslash} told me to tell you: ${message}"
+ else
+ [[ -d "announcements/people/${subject}" ]] || mkdir -p "announcements/people/${subject}"
+ echo "${personoslash} told me to tell you: ${message}" >> "announcements/people/${subject}/messages"
- response=$(shuf -e 'certainly' 'I will do' 'OK' | head -1)
- send_msg "${channel_it_came_from}" "${personoslash}: ${response}"
+ response=$(shuf -e 'certainly' 'I will do' 'OK' | head -1)
+ send_msg "${channel_it_came_from}" "${personoslash}: ${response}"
+ fi
;;
"${my_own_name}: "+([![:space:]])" is "+([![:space:]])* )
declare -l thing="${sentence#${my_own_name}: }"