Skip to content

Commit 051f1f6

Browse files
committed
fixes
1 parent e46b95e commit 051f1f6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/cinch/plugins/imglog.rb

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) 2011 Victor Bergöö
44
# This program is made available under the terms of the MIT License.
55

6-
require 'CGI'
6+
require 'cgi'
77
require 'cinch'
88
require 'curl'
99
require 'uri'
@@ -50,11 +50,10 @@ def ignore? uri
5050
end
5151

5252
def oembed uri
53-
puts config["oembed"] + CGI.escape(uri)
5453
curl = Curl::Easy.http_get(config["oembed"] + CGI.escape(uri))
5554
json = JSON.parse curl.body_str
56-
return nil unless json["succes"] == 'true'
57-
return nil unless vaild? json["url"]
55+
return nil unless json["success"] == 'true'
56+
return nil unless valid? json["url"]
5857
return json["url"]
5958
end
6059

0 commit comments

Comments
 (0)