URI: 
       Properly implement IRC credentials. - annna - Annna the nice friendly bot.
  HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
       ---
   DIR commit 422cb5dbee81d701bc28ad0eedce46174ae8a1ef
   DIR parent 236b6b07b9ad1489f7dddc23ea37416055556085
  HTML Author: Annna Robert-Houdin <annna@bitreich.org>
       Date:   Sat, 15 Jan 2022 14:17:53 +0100
       
       Properly implement IRC credentials.
       
       Diffstat:
         M annna-start-main                    |      19 +++++++++++++------
       
       1 file changed, 13 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/annna-start-main b/annna-start-main
       @@ -27,13 +27,13 @@ channels="$4"
                        mkdir -p ${ircbase}/${server}
        
                        # Connection
       -                export ircuser="$(sed -n 's/^user: //p' ${cfgbase}/${server}/irc-credentials.txt 2>/dev/null)"
       +                export ircuser="$(sed -n 's/^user: //p' ${cfgbase}/${server}/irc-credentials 2>/dev/null)"
                        ircuserparam=""
       -                [ -n "${ircuserparam}" ] && ircuserparam="-u ${ircuser}"
       +                [ -n "${ircuser}" ] && ircuserparam=" -n ${ircuser}"
        
       -                export ircpass="$(sed -n 's/^pass: //p' ${cfgbase}/${server}/irc-credentials.txt 2>/dev/null)"
       +                export ircpass="$(sed -n 's/^pass: //p' ${cfgbase}/${server}/irc-credentials 2>/dev/null)"
                        ircpassparam=""
       -                [ -n "${ircpassparam}" ] && ircpassparam="-k ircpass"
       +                [ -n "${ircpass}" ] && ircpassparam=" -k ircpass"
        
                        if [ -f ${cfgbase}/${server}/fullname ];
                        then
       @@ -42,8 +42,9 @@ channels="$4"
                                fullname="Gode"
                        fi
        
       -                #ii -s "${server}" -t -p 6697 -n "$ircuser" -k ircpass \
       -                #        -f "Annna Robert-Houdin" &
       +                # For debugging.
       +                #ii -s "${server}"${ircpassparam}${ircuserparam}${tlsparam} \
       +                #        -f "${fullname}" -p ${port} &
        
                        ii -s "${server}"${ircpassparam}${ircuserparam}${tlsparam} \
                                -f "${fullname}" -p ${port} 2>&1 >/dev/null &
       @@ -59,6 +60,12 @@ channels="$4"
                                sleep 2
                        done
        
       +                # 433: Nickname is already in use.
       +                if [ -n "$(grep " 433 " ${ircbase}/${server}/out)" ];
       +                then
       +                        exit 1
       +                fi
       +
                        #while [ -z "$(grep " 376 " ${ircbase}/${server}/out)" ];
                        #do
                        #        [ ! -f ${cfgbase}/running ] && exit 1