From b791e3e38fbc868f523e345cfc802938de77289f Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 21 Apr 2019 07:42:49 +0000 Subject: more 'hellos' and 'you got that right' --- labs_change_detector | 2 ++ process_event | 14 ++++++++++++-- 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}!" ;; -- cgit v1.2.2