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
|
autoRejoinChannel=true
|
||||||
# Say something nasty to whomever kicked the bot?
|
# Say something nasty to whomever kicked the bot?
|
||||||
curseKicker=true
|
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"
|
./triggers/link/link.sh "$who" "$from" "$result"
|
||||||
set -f
|
set -f
|
||||||
# Although this calls modules, it triggers on text other than the bot's nick
|
# 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="${result#*:[[:punct:]]}"
|
||||||
command="${command//# /}"
|
command="${command//# /}"
|
||||||
will="${command#* }"
|
will="${command#* }"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user