Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/ii-answer
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-05-27 11:50:44 +0200
committerErich Eckner <git@eckner.net>2021-05-27 11:50:44 +0200
commitad668ad947883a7eb94869ace804d1711f0449b8 (patch)
tree9ea8067273938cba6947de7d26613df721c834e4 /bin/ii-answer
parenta150710789e4ad501f5bf102a16034d170b31f7b (diff)
bin/ii-answer: no phrik in #archlinux32-devops, so we should not `!rq $user`, there
Diffstat (limited to 'bin/ii-answer')
-rwxr-xr-xbin/ii-answer10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/ii-answer b/bin/ii-answer
index 3077311..838b262 100755
--- a/bin/ii-answer
+++ b/bin/ii-answer
@@ -9,23 +9,23 @@
# welcome devs (in #archlinux32 and #archlinux32-devops only)
welcome_user_regex='^\S\+ -!- \(abaumann\|buildmaster\|deep42thought\|girls\|nit-picker\|tyzoid\)(.* has joined \S\+$'
-for channel in '#archlinux32' '#archlinux32-devops'; do
+for channel in '#archlinux32:Hi \0!\n!rq \0' '#archlinux32-devops:Hi \0!'; do
new_users=$(
sed -i '
s/'"${welcome_user_regex}"'/\1/
T
w /dev/stdout
d
- ' "${irc_dir}/${channel}/out" | \
+ ' "${irc_dir}/${channel%%:*}/out" | \
sort -u
)
if [ -n "${new_users}" ]; then
printf '%s\n' "${new_users}" | \
sed '
- s/^.*$/Hi \0!\n!rq \0/
- s/Hi buildmaster!\n//
+ s/^.*$/'"${channel#*:}"'/
+ s/Hi buildmaster!\(\n\|$\)//
' | \
- irc_say "${channel}" 'copy'
+ irc_say "${channel%%:*}" 'copy'
fi
done