dot

packages and services management
Log | Files | Refs | README

commit 393c63ef1fb2f38cf45874f99a79968fd472640c
parent 16d68c9b20b58b42ab92883cdefe53b212d30b11
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Thu, 10 Aug 2017 10:16:58 +0200

libbearssl/bin/bot: follow usual naming scheme

Diffstat:
Mlibbearssl/bin/bot | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libbearssl/bin/bot b/libbearssl/bin/bot @@ -4,19 +4,19 @@ CHAN=#commits NICK=${0##*/} PASS=$PASS -mkdir -p "$VAR/irc/bot" -cd "$VAR/irc/bot" || exit +mkdir -p "$VAR/irc/$CHAN" +cd "$VAR/irc/$CHAN" || exit -[ -p in ] || mkfifo in +[ -p bot ] || mkfifo bot -tail -f in | brssl client "$HOST:6697" | +tail -f bot | brssl client "$HOST:6697" | while IFS='' read -r line do case "$line" in ('PING :'*) printf '%s\n' "$line" sleep 1 - printf 'PONG%s\n' "${line#PING}" > in + printf 'PONG%s\n' "${line#PING}" > bot printf 'PONG%s\n' "${line#PING}" ;; (*) @@ -26,11 +26,11 @@ do done | sed -r -n 's/^:?[^:]*:// p' >> out & sleep 5 -printf 'USER %s +i * :%s\n' "$NICK" "$DESC" > in -printf 'NICK %s\n' "$NICK" > in +printf 'USER %s +i * :%s\n' "$NICK" "$DESC" > bot +printf 'NICK %s\n' "$NICK" > bot sleep 5 -printf 'PRIVMSG NickServ :IDENTIFY %s\n' "$PASS" > in +printf 'PRIVMSG NickServ :IDENTIFY %s\n' "$PASS" > bot sleep 5 -printf 'JOIN %s\n' "$CHAN" > in +printf 'JOIN %s\n' "$CHAN" > bot wait