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:
authorErich Eckner <git@eckner.net>2018-04-16 21:31:47 +0200
committerErich Eckner <git@eckner.net>2018-04-16 21:32:04 +0200
commit809cbd113232eee77dd5a73520bb0608d7a00046 (patch)
tree636cd81c7726dd9c7ecffd56ac48a7cf42b3149c /bin/ii-connect
parent7dd3fc81fd48e5b72c7f7b3c090dea9f65553fe2 (diff)
bin/ii-connect: teach the buildmaster some respect for the devs
Diffstat (limited to 'bin/ii-connect')
-rwxr-xr-xbin/ii-connect21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/ii-connect b/bin/ii-connect
index 030dd87..ca8ea99 100755
--- a/bin/ii-connect
+++ b/bin/ii-connect
@@ -49,6 +49,27 @@ if [ "$1" = 'watch' ]; then
)
fi
done_something=false
+ welcome_user_regex='^\S\+ -!- \(abaumann\|deep42thought\|tyzoid\)(.* has joined \S\+$'
+ new_users=$(
+ sed -n '
+ s/'"${welcome_user_regex}"'/\1/
+ T
+ p
+ ' "${irc_dir}/#archlinux32/out" | \
+ sort -u
+ )
+ if [ -n "${new_users}" ]; then
+ sed -i '
+ /'"${welcome_user_regex}"'/ d
+ ' "${irc_dir}/#archlinux32/out"
+ done_something=true
+ printf '%s\n' "${new_users}" | \
+ sed '
+ s/^/Hi /
+ s/$/!/
+ ' | \
+ irc_say
+ fi
find "${irc_dir}" \
-type f \
-name 'out' \