summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2019-04-21 07:42:49 +0000
committerbill-auger <mr.j.spam.me@gmail.com>2019-09-25 16:02:37 -0400
commitb791e3e38fbc868f523e345cfc802938de77289f (patch)
tree51dafd12dd270d66e036c0775c8b1411fa2aeca3
parentb8a24949b60fcba8dfea497e1fdb900498307d65 (diff)
more 'hellos' and 'you got that right'
-rwxr-xr-xlabs_change_detector2
-rw-r--r--process_event14
2 files changed, 14 insertions, 2 deletions
diff --git a/labs_change_detector b/labs_change_detector
index fb8862e..c79b9f1 100755
--- a/labs_change_detector
+++ b/labs_change_detector
@@ -11,10 +11,12 @@ then
echo "[LABS]: ERROR: cannot find the \`inotify\` program"
exit
elif [[ ! -d "${BOT_MAIL_DIR}" ]]
+then
echo "[LABS]: no such directory set in BOT_MAIL_DIR: '${BOT_MAIL_DIR}'. fail"
exit
fi
+
inotifywait -m --format '%w%f' -e create "${BOT_MAIL_DIR}" 2>/dev/null |
while read email
do
diff --git a/process_event b/process_event
index 35d0ffb..ae97b58 100644
--- a/process_event
+++ b/process_event
@@ -274,8 +274,18 @@ function process_event
# hello #
#########
- hello|hi)
- send_msg "${channel_it_came_from}" "hello ${person}, it works!!!"
+ 'Hello' | 'Hello!' | 'Hello?' | 'Hi' | 'Hi!' | \
+ 'hello' | 'hello!' | 'hello?' | 'hi' | 'hi!' )
+ send_msg "${channel_it_came_from}" "Hello ${person}! Is something on your mind? Feel free to comment or ask a question at any time. Be patient if no one responds immediately. That is quite normal on the IRC. Many people will read your message when they can, and perhaps reply, if you are still in the channel."
+ ;;
+
+
+ ######################
+ # you got that right #
+ ######################
+
+ *" that right ${my_own_name}"* )
+ send_msg "${channel_it_came_from}" "You got that right, ${person}!"
;;