diff options
author | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-07-28 10:49:33 +0100 |
---|---|---|
committer | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-07-28 10:49:33 +0100 |
commit | cce3505542c7f86da6ef48e9ad1c904e3f9528c9 (patch) | |
tree | fabbed85cbf6b505d136c816055ec7e23cfe4927 | |
parent | 5a2a44f46844bda90ea2b57f025a4137fb45cf15 (diff) |
Now, when someone tells pbot to tell someone something, the response is chosen randomly from a selection of responses.
-rw-r--r-- | hack_of_all_hacks | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks index c7473ae..58c8f51 100644 --- a/hack_of_all_hacks +++ b/hack_of_all_hacks @@ -215,7 +215,9 @@ EOF message="${message# }" echo "${personoslash} told me to tell you: ${message}" >> "announcements/people/${subject}/messages" - send_msg "${channel_it_came_from}" "${personoslash}: certainly" + + response=$(shuf -e 'certainly' 'I will do' 'OK' | head -1) + send_msg "${channel_it_came_from}" "${personoslash}: ${response}" ;; *pbot:* ) while read line @@ -230,7 +232,7 @@ EOF esac # TODO: add a birthday announcement feature, cointoss feature, timer - # feature, tell so and so this feature, store phrase feature. + # feature, store phrase feature. ######### # Tests # |