Updated the bot to have configurable symbols for calling it.
This commit is contained in:
parent
c88983051a
commit
4aeb0f4618
2
bot.cfg
2
bot.cfg
@ -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
2
bot.sh
@ -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#* }"
|
||||
|
Loading…
Reference in New Issue
Block a user