diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/url.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb index f44da3eb..ef5374ab 100644 --- a/data/rbot/plugins/url.rb +++ b/data/rbot/plugins/url.rb @@ -140,6 +140,11 @@ class UrlPlugin < Plugin debug "Title #{title ? '' : 'not '} found" reply = "#{LINK_INFO} #{title}" if title rescue => e + if e.message =~ /\(404 - Not Found\)/i + # see if we failed to find the thing because of trailing punctuation + # but check that we still have 'something' in the URL + retry if urlstr.chop! and urlstr =~ /^https?:\/\/./ + end reply = "Error #{e.message}" end |