summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ircsink10
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/ircsink b/bin/ircsink
index dcbe294..c81f1a2 100755
--- a/bin/ircsink
+++ b/bin/ircsink
@@ -222,7 +222,15 @@ main() {(
echo "AUTHENTICATE $message"
echo "AUTHENTICATE ***REDACTED***" >&2
- sed -nru '/^(.*?):SASL authentication successful/q'
+ # wait for SASL to finish
+ # RPL_SASLSUCCESS (903)
+ # ERR_SASLFAIL (904)
+ # ERR_SASLTOOLONG (905)
+ sasl_result=$(sed -nru 's/^:[^ ]* (90[345]) .*/\1/p;T;q')
+ if test $sasl_result -ne 903; then
+ echo "$0: error: SASL authentication failed" >&2
+ exit 1
+ fi
;;
esac