Introduction
Introduction Statistics Contact Development Disclaimer Help
Properly implement IRC credentials. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 422cb5dbee81d701bc28ad0eedce46174ae8a1ef
parent 236b6b07b9ad1489f7dddc23ea37416055556085
Author: Annna Robert-Houdin <[email protected]>
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(-)
---
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}/i…
+ export ircuser="$(sed -n 's/^user: //p' ${cfgbase}/${server}/i…
ircuserparam=""
- [ -n "${ircuserparam}" ] && ircuserparam="-u ${ircuser}"
+ [ -n "${ircuser}" ] && ircuserparam=" -n ${ircuser}"
- export ircpass="$(sed -n 's/^pass: //p' ${cfgbase}/${server}/i…
+ export ircpass="$(sed -n 's/^pass: //p' ${cfgbase}/${server}/i…
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
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.