Added ability to autorejoin after being kicked.

This commit is contained in:
Storm Dragon 2017-04-28 19:20:45 -04:00
parent c5ee416be9
commit f559edad96
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#enter channels here in quotes before the )
channel=(
"talkingarch"
"a11y"
)
# The date format for log entries. man date for details.
dateFormat='%B %d, %I:%m%P'
@ -19,3 +19,5 @@ quitMessage="$nick vanishes in a sudden flash of brilliant lightning."
server="irc.netwirc.tk"
# format=username hostname servername :realname
user="$nick ${server%.} $server :$nick"
# auto rejoin if kicked from channel?
autoRejoinChannel=true

6
bot.sh
View File

@ -40,6 +40,12 @@ do
*"You have not"*)
echo "JOIN #$channel" | tee -a "$input"
;;
# Run on kick
:*!*@*" KICK "*" $nick :"*)
if [ "$autoRejoinChannel" = "true" ]; then
echo "JOIN #$c" | tee -a "$input"
fi
;;
# run when someone joins
*"JOIN :#"*)
who="${result%%!*}"