Updated the bot to have configurable symbols for calling it.

This commit is contained in:
Storm Dragon 2020-08-13 17:34:09 -04:00
parent c88983051a
commit 4aeb0f4618
2 changed files with 3 additions and 1 deletions

View File

@ -21,3 +21,5 @@ user="$nick ${server%.} $server :$nick"
autoRejoinChannel=true
# Say something nasty to whomever kicked the bot?
curseKicker=true
# Symbols used to specify you are calling a bot module.
botCaller=",.!+?"

2
bot.sh
View File

@ -96,7 +96,7 @@ set +f
./triggers/link/link.sh "$who" "$from" "$result"
set -f
# Although this calls modules, it triggers on text other than the bot's nick
elif [[ "$result" =~ ^.*PRIVMSG.*:[[:punct:]].* ]]; then
elif [[ "$result" =~ ^.*PRIVMSG.*:[${botCaller}].* ]]; then
command="${result#*:[[:punct:]]}"
command="${command//# /}"
will="${command#* }"