From 349b61f34c83740f8266ef07620158cdf939bb46 Mon Sep 17 00:00:00 2001 From: clsr Date: Mon, 13 Jun 2022 21:25:03 +0000 Subject: Add password support --- config.bash | 3 +++ ircbot.bash | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/config.bash b/config.bash index 18d729d..645c367 100644 --- a/config.bash +++ b/config.bash @@ -13,6 +13,9 @@ IRCBOT_PORT=6667 # bot nick IRCBOT_NICK=sedbot +# bot pass, empty to disable +IRCBOT_PASS= + # bot login name IRCBOT_LOGIN=$IRCBOT_NICK diff --git a/ircbot.bash b/ircbot.bash index b6701c0..646c4da 100755 --- a/ircbot.bash +++ b/ircbot.bash @@ -77,6 +77,11 @@ connect() { return $? fi + if [[ -n "$IRCBOT_PASS" ]]; then + if ! sendmsg PASS "$IRCBOT_PASS"; then + return $? + fi + fi if ! sendmsg NICK "$IRCBOT_NICK"; then return $? fi -- cgit