Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/ii-connect
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ii-connect')
-rwxr-xr-xbin/ii-connect8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/ii-connect b/bin/ii-connect
index d678af1..07f47c6 100755
--- a/bin/ii-connect
+++ b/bin/ii-connect
@@ -140,6 +140,14 @@ if [ "$1" = 'watch' ]; then
printf 'up? I'"'"'m up for %s, %s\n' "$(uptime -p | sed 's/^up //')" "$(uptime | sed 's/.*, //')" | \
sponge "${out_file%/out}/in"
fi
+ regex='^\(\S\+ \)\?\S\+ <\S\+> \(.* \)\?[Tt]h\(anks\|x\)\([ ,.]\|$\)'
+ if grep "${regex}" "${out_file}" | \
+ grep -q "${sloppy_salutation}"; then
+ done_something=true
+ sed -i "/${regex}/d" "${out_file}"
+ printf 'np\n' | \
+ sponge "${out_file%/out}/in"
+ fi
done
sleep 1
done