We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e46b95e commit 051f1f6Copy full SHA for 051f1f6
lib/cinch/plugins/imglog.rb
@@ -3,7 +3,7 @@
3
# Copyright (c) 2011 Victor Bergöö
4
# This program is made available under the terms of the MIT License.
5
6
-require 'CGI'
+require 'cgi'
7
require 'cinch'
8
require 'curl'
9
require 'uri'
@@ -50,11 +50,10 @@ def ignore? uri
50
end
51
52
def oembed uri
53
- puts config["oembed"] + CGI.escape(uri)
54
curl = Curl::Easy.http_get(config["oembed"] + CGI.escape(uri))
55
json = JSON.parse curl.body_str
56
- return nil unless json["succes"] == 'true'
57
- return nil unless vaild? json["url"]
+ return nil unless json["success"] == 'true'
+ return nil unless valid? json["url"]
58
return json["url"]
59
60
0 commit comments