Permalink
Browse files

formatting

  • Loading branch information...
1 parent 6b20911 commit 06e41e20a443aeffa9df6467c51efb5cf3cb6a23 @dominikh committed Apr 18, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/cinch/plugins/url_summarizer.rb
@@ -157,11 +157,11 @@ def listen(m)
if uri.fragment =~ /^!\/.+?\/status\/(\d+)$/
open("https://twitter.com/statuses/show/#{$1}.json",
:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
- json = http.read
- tweet = JSON.parse(json)
- escaped_text = CGI.unescapeHTML(tweet['text'])
- m.reply "[#{Format(:bold, "twitter")}] <#{tweet[ 'user' ][ 'screen_name' ]}> #{escaped_text}"
- end
+ json = http.read
+ tweet = JSON.parse(json)
+ escaped_text = CGI.unescapeHTML(tweet['text'])
+ m.reply "[#{Format(:bold, "twitter")}] <#{tweet[ 'user' ][ 'screen_name' ]}> #{escaped_text}"
+ end
end
when "github.com"
if uri.path =~ /\/(.+?)\/commit\//
@@ -183,7 +183,7 @@ def listen(m)
end
else
title = page.title.gsub(/[\x00-\x1f]*/, "").gsub(/[ ]{2,}/, " ").strip rescue nil
- m.reply title
+ m.reply "[URL] " + title
end
end
end

0 comments on commit 06e41e2

Please sign in to comment.