]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/url.rb
rss plugin: user ircify_html
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / url.rb
index 3640160459daf0265d50157f9bba56a31a5d96f1..a1a325eb3d5f9bdfbc60f0e5ef368bd2687194b4 100644 (file)
@@ -1,5 +1,3 @@
-require 'uri'
-
 Url = Struct.new("Url", :channel, :nick, :time, :url)
 TITLE_RE = /<\s*?title\s*?>(.+?)<\s*?\/title\s*?>/im
 LINK_INFO = "[Link Info]"
@@ -69,6 +67,11 @@ class UrlPlugin < Plugin
       end
 
       debug response.to_hash.inspect
+
+      enc = response['content-encoding']
+
+      extra << ", #{Bold}encoding#{Bold}: #{enc}" if enc
+
       unless @bot.config['url.titles_only']
         # content doesn't have title, just display info.
         size = response['content-length'].gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/,'\1,\2') rescue nil