index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-06-04 09:45:25 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-04 09:45:25 +0200 |
commit | 7f19dfd1616945c7e8ee9f41bee610d4ef1ffbe5 (patch) | |
tree | 5f93ac909dd9ae44752a419740953c33a4095873 /bin/ii-answer | |
parent | 2944fd6d91d437147521c48b6c9d30ab50755152 (diff) |
-rwxr-xr-x | bin/ii-answer | 13 |
diff --git a/bin/ii-answer b/bin/ii-answer index 06bc3c0..779e1e9 100755 --- a/bin/ii-answer +++ b/bin/ii-answer @@ -115,4 +115,17 @@ find "${irc_dir}" \ printf 'np\n' | \ irc_say "${channel}" 'copy' fi + if [ -z "${channel%%#*}" ]; then + # answer "Shut up!" + regex='^\S\+ <\S\+> .* [Ss][Hh][Uu][Tt] \?[Uu][Pp]' + if grep "${regex}" "${out_file}" | \ + grep -q "${sloppy_salutation}"; then + sed -i "/${regex}/d" "${out_file}" + printf '%s\n' "$(( + $(date '+%s') + 3600 + ))" > "${work_dir}/irc-shut-up" + printf 'Sorry, I will do.\n' | \ + irc_say "${channel}" 'copy' + fi + fi done |