Protection for links.
This commit is contained in:
parent
ec8878b6d1
commit
4217b45207
2
bot.sh
2
bot.sh
@ -92,7 +92,9 @@ set +f
|
|||||||
# Trigger stuff happens here.
|
# Trigger stuff happens here.
|
||||||
# Call link trigger if msg contains a link:
|
# Call link trigger if msg contains a link:
|
||||||
if [[ "$result" =~ .*http://|https://|www\..* ]]; then
|
if [[ "$result" =~ .*http://|https://|www\..* ]]; then
|
||||||
|
set -f
|
||||||
./triggers/link/link.sh "$who" "$from" "$result"
|
./triggers/link/link.sh "$who" "$from" "$result"
|
||||||
|
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.*:[[:punct:]].* ]]; then
|
||||||
command="${result#*:[[:punct:]]}"
|
command="${result#*:[[:punct:]]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user