cinch-rfc 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cinch/plugins/rfc.rb +2 -1
- data/lib/cinch/plugins/rfc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7bbd561465d5e4fb975023948128cd427d0d801
|
4
|
+
data.tar.gz: c2fd97fa39d28ee7092c00a68dc2c6efa9af53f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 911e00e9f2b5b651866e02d1b711a36c42ab96a210254034ba43f9eb07054a9c092a4e98e83102749e6c66ed2b9b509de7dacf2d4b4af0653cdb821405159c55
|
7
|
+
data.tar.gz: 43c3e947e3c24b8049fc94b9b9971f17e54eb2ed681ca331c47ab0e592a78d271bc675516908f40a6ea21b8a849c3c2d91a3c71afbb7f6b39d26aa1cc833ac7a
|
data/lib/cinch/plugins/rfc.rb
CHANGED
@@ -20,12 +20,13 @@ module Cinch
|
|
20
20
|
|
21
21
|
def rfc_name_from_url(uri)
|
22
22
|
call = Curl::Easy.perform(uri) do |easy|
|
23
|
+
easy.headers["User-Agent"] = "cinch-rfc IRC bot"
|
23
24
|
easy.follow_location = true
|
24
25
|
easy.max_redirects = 2
|
25
26
|
end
|
26
27
|
|
27
28
|
html = Nokogiri::HTML(call.body_str)
|
28
|
-
html.at_xpath('//
|
29
|
+
html.at_xpath('//meta[@name="DC.Title"]')['content']
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|