diff options
author | Erich Eckner <git@eckner.net> | 2020-04-25 13:55:32 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-04-25 13:55:32 +0200 |
commit | 5cba2a96e203e74229128e94dd91051dba30c28f (patch) | |
tree | 2f5b652e918ee4c686ceb9950f73820b4ea55fab | |
parent | eb80efa196a3cc144973671af4bbbc623179bdb0 (diff) | |
download | builder-5cba2a96e203e74229128e94dd91051dba30c28f.tar.xz |
bin/ii-answer: sanity-check can now be triggered from irc
-rwxr-xr-x | bin/ii-answer | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/ii-answer b/bin/ii-answer index b16f821..1139064 100755 --- a/bin/ii-answer +++ b/bin/ii-answer @@ -147,6 +147,20 @@ find "${irc_dir}" \ sort -u | \ irc_say "${channel}" 'copy' fi + # answer "sanity-check" + regex='^\S\+ <\S\+> .*[Gg]et.*\(straight\|together\)' + if grep "${regex}" "${out_file}" | \ + grep -q "${sloppy_salutation}"; then + sed -i "/${regex}/d" "${out_file}" + if [ -s "${work_dir}/build-master-sanity" ]; then + printf 'I will check my sanity again.\n' \ + | irc_say "${channel}" 'copy' + sanity-check -w + else + printf 'Are you kidding? I'"'"'m all right.\n' \ + | irc_say "${channel}" 'copy' + fi + fi # answer "say/tell ... new/random/more" regex='^\S\+ <\(\S\+\)> \(.* \)\?\([Ss]ay\|[Tt]ell\).*\(new\|random\|more\).*' if grep "${regex}" "${out_file}" | \ |