summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ii-answer38
-rwxr-xr-xbin/ii-watch4
-rwxr-xr-xbin/nit-picker6
-rwxr-xr-xconf/master.conf.example2
-rwxr-xr-xlib/common-functions4
5 files changed, 28 insertions, 26 deletions
diff --git a/bin/ii-answer b/bin/ii-answer
index ffaa08b..3077311 100755
--- a/bin/ii-answer
+++ b/bin/ii-answer
@@ -7,25 +7,27 @@
# shellcheck source=../lib/load-configuration
. "${0%/*}/../lib/load-configuration"
-# welcome devs (in #archlinux32 only)
+# welcome devs (in #archlinux32 and #archlinux32-devops only)
welcome_user_regex='^\S\+ -!- \(abaumann\|buildmaster\|deep42thought\|girls\|nit-picker\|tyzoid\)(.* has joined \S\+$'
-new_users=$(
- sed -i '
- s/'"${welcome_user_regex}"'/\1/
- T
- w /dev/stdout
- d
- ' "${irc_dir}/#archlinux32/out" | \
- sort -u
-)
-if [ -n "${new_users}" ]; then
- printf '%s\n' "${new_users}" | \
- sed '
- s/^.*$/Hi \0!\n!rq \0/
- s/Hi buildmaster!\n//
- ' | \
- irc_say '' 'copy'
-fi
+for channel in '#archlinux32' '#archlinux32-devops'; do
+ new_users=$(
+ sed -i '
+ s/'"${welcome_user_regex}"'/\1/
+ T
+ w /dev/stdout
+ d
+ ' "${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//
+ ' | \
+ irc_say "${channel}" 'copy'
+ fi
+done
find "${irc_dir}" \
-type f \
diff --git a/bin/ii-watch b/bin/ii-watch
index 8ebefbe..ae008c4 100755
--- a/bin/ii-watch
+++ b/bin/ii-watch
@@ -23,7 +23,7 @@ while pgrep -x 'ii' >/dev/null && \
$(date +%s) + 60*5
))
fi
- echo '/NAMES #archlinux32' \
+ echo '/NAMES #archlinux32-devops' \
| sponge "${irc_dir}/in"
fi
if [ -z "${said}" ]; then
@@ -65,7 +65,7 @@ while pgrep -x 'ii' >/dev/null && \
{
echo 0
sed '
- s/^\([0-9]\+\) = #archlinux32\( \S\+\)* buildmaster\( \S\+\)*$/\1/
+ s/^\([0-9]\+\) = #archlinux32-devops\( \S\+\)* buildmaster\( \S\+\)*$/\1/
t
d
' "${irc_dir}/out"
diff --git a/bin/nit-picker b/bin/nit-picker
index 0739923..8dd0156 100755
--- a/bin/nit-picker
+++ b/bin/nit-picker
@@ -86,7 +86,7 @@ if ${irc}; then
rm -rf --one-file-system "${irc_dir}"
- ii -s irc.freenode.net -n nit-picker -f nit-picker >/dev/null 2>&1 &
+ ii -s irc.libera.chat -n nit-picker -f nit-picker >/dev/null 2>&1 &
ii_pid=$!
clean_up() {
@@ -109,10 +109,10 @@ if ${irc}; then
done
# join channel
- echo '/j #archlinux32' | \
+ echo '/j #archlinux32-devops' | \
sponge "${irc_dir}/in"
- while [ ! -f "${irc_dir}/#archlinux32/out" ]; do
+ while [ ! -f "${irc_dir}/#archlinux32-devops/out" ]; do
sleep 1
done
diff --git a/conf/master.conf.example b/conf/master.conf.example
index 4ec36f8..2234dfd 100755
--- a/conf/master.conf.example
+++ b/conf/master.conf.example
@@ -29,7 +29,7 @@
#intentions_directory="${work_dir}/intentions"
# irc client configuration
-#irc_dir='/home/master/irc/irc.freenode.net'
+#irc_dir='/home/master/irc/irc.libera.chat'
#irc_password='top_secret'
# list of urls to trigger updates of the respective mirrors
diff --git a/lib/common-functions b/lib/common-functions
index 8b842ff..4af92db 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -778,7 +778,7 @@ extract_pkgname_epoch_pkgver_pkgrel_sub_pkgrel_arch_from_package_name() {
}
# irc_say $channel [copy]
-# say content of stdin in irc channel $channel (default: #archlinux32)
+# say content of stdin in irc channel $channel (default: #archlinux32-devops)
# and print copy to stdout if 'copy' is given
# shellcheck disable=SC2120
@@ -786,7 +786,7 @@ irc_say() {
local channel
local content
if [ -z "$1" ]; then
- channel='#archlinux32'
+ channel='#archlinux32-devops'
else
channel="$1"
fi