summaryrefslogtreecommitdiffstats
path: root/plugins/commands/cycki.rb
blob: 77fd612d39b9caf87bf74103175ac205efef9713 (plain)
1
2
3
4
5
6
7
8
9
10
require 'net/http'
require 'nokogiri'

Client.register_command("cycki") { |args|
    link = ""
    begin
        link = Nokogiri::HTML(Net::HTTP.get(URI(Config[:commands][:cycki][:url]))).xpath('//img/@src').inner_text.gsub("_preview", "")
    end while link !~ /http/
    Config[:commands][:cycki][:message] + link
}