diff options
author | Joe <joe@joelightning.com> | 2011-11-19 20:03:42 +0000 |
---|---|---|
committer | Joe <joe@joelightning.com> | 2011-11-19 20:03:42 +0000 |
commit | 7d07b7856d7adeddcda28c767113fa16de0e3c86 (patch) | |
tree | a9f8a8124d4eaf3846d7d732f8df6feeb3f19d3e /hack_of_all_hacks | |
parent | c65ab531d160555b1be5aa49b811cb14a618cf55 (diff) |
Don't try to get page title of a link itself just posted
Diffstat (limited to 'hack_of_all_hacks')
-rw-r--r-- | hack_of_all_hacks | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks index 9e5eacb..2be79cc 100644 --- a/hack_of_all_hacks +++ b/hack_of_all_hacks @@ -144,12 +144,15 @@ EOF # Should send a message like: echo 'This is the message' > /tmp/un-provoked-message-store + injected_data=0 + line_half_filtered="${line##*PRIVMSG}" line_filtered=${line_half_filtered##* :} if [[ ${personoslash} == tlCJ99mfZl ]] then send_msg "${channel_it_came_from}" "${line_filtered}" + injected_data=1 fi ##################### @@ -159,7 +162,9 @@ EOF # If pbot is present record it. [[ ${sender%%!*} == pbot ]] && echo yes > pbot_present - if [[ ${line} =~ http://[^\ ]+ ]] || [[ ${line} =~ https://[^\ ]+ ]] + # We don't want to get the page title if it's injected data. + if [[ ${line} =~ http://[^\ ]+ ]] || [[ ${line} =~ https://[^\ ]+ ]] && + (( ! injected_data )) then url_to_get="${BASH_REMATCH}" |