summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/url.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-18 07:05:48 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-18 07:05:48 +0000
commite6558c5cd4181e0ab2247b08fc9bfb4602610e00 (patch)
tree5a84c60a5396d575e2f6cb8a0b7b10e73535fab4 /data/rbot/plugins/url.rb
parent265b4987ca6c73b94fbac060cf43bd31fe021aaa (diff)
HTML processing refactoring: url plugin: only add encoding and size information to pages with title if url.first_par is true
Diffstat (limited to 'data/rbot/plugins/url.rb')
-rw-r--r--data/rbot/plugins/url.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb
index 7a752ec6..c4fce2ae 100644
--- a/data/rbot/plugins/url.rb
+++ b/data/rbot/plugins/url.rb
@@ -83,13 +83,13 @@ class UrlPlugin < Plugin
extra << "#{Bold}type#{Bold}: #{resp['content-type']}" unless title
if enc = resp['content-encoding']
logopts[:extra] << ", encoding: #{enc}"
- extra << "#{Bold}encoding#{Bold}: #{enc}"
+ extra << "#{Bold}encoding#{Bold}: #{enc}" if @bot.config['url.first_par'] or not title
end
size = resp['content-length'].first.gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2') rescue nil
if size
logopts[:extra] << ", size: #{size} bytes"
- extra << "#{Bold}size#{Bold}: #{size} bytes"
+ extra << "#{Bold}size#{Bold}: #{size} bytes" if @bot.config['url.first_par'] or not title
end
end
rescue Exception => e