dot

packages and services management
Log | Files | Refs | README

commit e08929533dbbd8e7e780b2a8bda0b72b8bc4c0eb
parent b773dcd51e5e38b279597e11fe854e75c4baf8bc
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Tue,  8 Aug 2017 23:43:17 +0200

libbearssl/bin/bot: be more flexible on the data

chan, nickname, hostname...

Diffstat:
Mlibbearssl/bin/bot | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/libbearssl/bin/bot b/libbearssl/bin/bot @@ -1,5 +1,6 @@ DESC='a small git that prints bot status' <<<<<<< HEAD +<<<<<<< HEAD HOST=unix.chat CHAN=#commits NICK=${0##*/} @@ -19,6 +20,11 @@ do ======= NICK=giitboot #${0##*/} CHAN='#commits' +======= +NICK=bot #${0##*/} +CHAN=#commits +HOST=unix.chat +>>>>>>> libbearssl/bin/bot: be more flexible on the data printf 'NickServ password: '; IFS='' read -r password @@ -26,14 +32,16 @@ printf 'NickServ password: '; IFS='' read -r password while : # keep trying to connect do - printf 'USER %s +i * :%s\nNICK %s\n' "$NICK" "$DESC" "$NICK" + printf 'USER %s +i * :%s\n' "$NICK" "$DESC" + printf 'NICK %s\n' "$NICK" printf 'PRIVMSG NickServ :IDENTIFY %s\n' "$password" + printf 'JOIN %s\n' "$CHAN" tail -f in | while IFS='' read -r line do printf 'PRIVMSG %s :%s\n' "$CHAN" "$line" done -done | brssl client unix.chat:6697 | while IFS='' read -r line +done | brssl client "$HOST:6697" | while IFS='' read -r line do case "$line" in ('PING :'*)