Added ability to autorejoin after being kicked.
This commit is contained in:
parent
c5ee416be9
commit
f559edad96
4
bot.cfg
4
bot.cfg
@ -1,6 +1,6 @@
|
|||||||
#enter channels here in quotes before the )
|
#enter channels here in quotes before the )
|
||||||
channel=(
|
channel=(
|
||||||
"talkingarch"
|
"a11y"
|
||||||
)
|
)
|
||||||
# The date format for log entries. man date for details.
|
# The date format for log entries. man date for details.
|
||||||
dateFormat='%B %d, %I:%m%P'
|
dateFormat='%B %d, %I:%m%P'
|
||||||
@ -19,3 +19,5 @@ quitMessage="$nick vanishes in a sudden flash of brilliant lightning."
|
|||||||
server="irc.netwirc.tk"
|
server="irc.netwirc.tk"
|
||||||
# format=username hostname servername :realname
|
# format=username hostname servername :realname
|
||||||
user="$nick ${server%.} $server :$nick"
|
user="$nick ${server%.} $server :$nick"
|
||||||
|
# auto rejoin if kicked from channel?
|
||||||
|
autoRejoinChannel=true
|
||||||
|
6
bot.sh
6
bot.sh
@ -40,6 +40,12 @@ do
|
|||||||
*"You have not"*)
|
*"You have not"*)
|
||||||
echo "JOIN #$channel" | tee -a "$input"
|
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
|
# run when someone joins
|
||||||
*"JOIN :#"*)
|
*"JOIN :#"*)
|
||||||
who="${result%%!*}"
|
who="${result%%!*}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user