#!/bin/sh # identify to nickserv and log in to the correct irc channels # shellcheck disable=SC2119,SC2120 # shellcheck source=../lib/load-configuration . "${0%/*}/../lib/load-configuration" # wait for nickserv complaint while ! grep -qF 'This nickname is registered. Please choose a different nickname' "${irc_dir}/nickserv/out"; do sleep 1 done # register printf 'identify %s\n' "${irc_password}" | \ sponge "${irc_dir}/nickserv/in" # wait for registering to succeed while ! grep -qF 'You are now identified for' "${irc_dir}/nickserv/out"; do sleep 1 done # join channel echo '/j #archlinux32' | \ sponge "${irc_dir}/in"